VideoCopilot Posted March 21, 2015 Posted March 21, 2015 Hello i made this npc that appear a html tb.append("<td><button value=" +p.getName() + " action=\"bypass -h Quest SearchPlayer getinfo\" width=180 height=21 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td><br>"); the question is how i set the bypass to target the player name example im the player "Admin" and the npc find all active players in world and appear their names in a list but i want when i click the player name to give me details for him like his levels e.t.c so in a new class private void Results(L2PcInstance p ) { } i want post the things of the player that i click his name like p.getLevel() e.t.c and return HIS LEVEL no mine.. Thanks! Quote
0 StealthyS4m Posted March 21, 2015 Posted March 21, 2015 (edited) public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); tb.append("<td><button value=" +p.getName() + " action=\"bypass -h npc_%objectId%_getSomeInfo\" + p.getName() width=180 height=21 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td><br>"); if(actualCommand.equals("getSomeInfo"){ String name = st.nextToken(); L2PcInstance player = L2World.getInstance.getPlayer(name); Results(player); } Plus,I believe there should be escape character after button value = and your value looks weird at all or maybe it's just me. P.S. If you are using TextBuilder or something like that(can't even remember) change it to StringBuilder. P.S.S.My code might be wrong,haven't tested. Edited March 21, 2015 by StealthyS4m Quote
0 VideoCopilot Posted March 21, 2015 Author Posted March 21, 2015 public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); tb.append("<td><button value=" +p.getName() + " action=\"bypass -h npc_%objectId%_getSomeInfo\" + p.getName() width=180 height=21 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td><br>"); if(actualCommand.equals("getSomeInfo"){ String name = st.nextToken(); L2PcInstance player = L2World.getInstance.getPlayer(name); Results(player); } Plus,I believe there should be escape character after button value = and your value looks weird at all or maybe it's just me. P.S. If you are using TextBuilder or something like that(can't even remember) change it to StringBuilder. P.S.S.My code might be wrong,haven't tested. Can you give me an add on skype cause i have 1 question on this i actualy want to understand it no just copy it skype: unst0ppabl32 Quote
Question
VideoCopilot
Hello i made this
npc that appear a html
tb.append("<td><button value=" +p.getName() + " action=\"bypass -h Quest SearchPlayer getinfo\" width=180 height=21 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td><br>");
the question is how i set the bypass to target the player name
example im the player "Admin" and the npc find all active players in world and appear their names in a list
but i want when i click the player name to give me details for him like his levels e.t.c so in a new class
private void Results(L2PcInstance p )
{
}
i want post the things of the player that i click his name like p.getLevel() e.t.c and return HIS LEVEL no mine..
Thanks!
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.