Jniko Posted April 19, 2017 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 2 Joined: 03/24/17 Last Seen: February 4, 2020 Share Posted April 19, 2017 (edited) Good day guys! I am trying to generate an NPC which converts PODS to ROK POINTS. Currently I have this scripts. prontera,155,181,5 script Sample 757,{ .@pod = countitem( 7179 ); if( .@pod ){ delitem 7179,.@pod; #ROK_POINTS += ( 50 * .@pod ); //#ROK_POINTS += .@pod; npctalk "You gained "+.@pod+" ROK Points. Total : "+#ROK_POINTS+" points."; } end; } But when I clicked the NPC nothing happens Can anyone have some solution to this problem? Thanks in advance Edited April 20, 2017 by Skorm Use code brakets Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted April 19, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted April 19, 2017 (edited) Maybe you clicked the npc without Item ID 7179 in your inventory? Edited April 20, 2017 by Technoken 1 Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted April 19, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted April 19, 2017 This is whole script? Where is line Set #ROK_POINTS 1 Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted April 19, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted April 19, 2017 @Cyro this one #ROK_POINTS += ( 50 * .@pod ); is the same as set #ROK_POINTS, #ROK_POINTS + (50 * .@pod); The npc doesn't have dialogue though. It just automatically converts pods to rok points when you click it. 1 Quote Link to comment Share on other sites More sharing options...
0 Jniko Posted April 20, 2017 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 2 Joined: 03/24/17 Last Seen: February 4, 2020 Author Share Posted April 20, 2017 21 hours ago, Technoken said: @Cyro this one #ROK_POINTS += ( 50 * .@pod ); is the same as set #ROK_POINTS, #ROK_POINTS + (50 * .@pod); The npc doesn't have dialogue though. It just automatically converts pods to rok points when you click it. 22 hours ago, Technoken said: Maybe you clicked the npc without Item ID 7179 in your inventory? I have item ID 7179 in my inventory but when I click the NPC nothing will happen except the item ID 7179 will vanish from my inventory even if I have item ID 7179 quantity 100, all of the 100 will be gone after I clicked the NPC. Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted April 20, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted April 20, 2017 20 minutes ago, Jniko said: I have item ID 7179 in my inventory but when I click the NPC nothing will happen except the item ID 7179 will vanish from my inventory even if I have item ID 7179 quantity 100, all of the 100 will be gone after I clicked the NPC. If the pods vanished from your inventory, that means the pods become ROK Points. I saw from your script you are using npctalk which will make the npc talk publicly about how much Rok Points. Try to replace npctalk with dispbottom so you can check how much rok points you got. prontera,155,181,5 script Sample 757,{ .@pod = countitem(7179); if( .@pod ){ delitem 7179,.@pod; #ROK_POINTS += ( 50 * .@pod ); dispbottom "You gained "+.@pod+" ROK Points. Total : "+#ROK_POINTS+" points."; } end; } 1 Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted April 20, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted April 20, 2017 here is command to check your rok points sec_in02,158,179,4 script pointsCheck 620,{ mes "type @points to check points anywhere"; OnPOINTS: dispbottom "Your total cash points is "+#ROKPOINTS+"."; end; OnInit: bindatcmd "points",strnpcinfo(3)+"::OnPOINTS"; end; } 1 Quote Link to comment Share on other sites More sharing options...
0 Jniko Posted April 20, 2017 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 2 Joined: 03/24/17 Last Seen: February 4, 2020 Author Share Posted April 20, 2017 41 minutes ago, Cyro said: here is command to check your rok points sec_in02,158,179,4 script pointsCheck 620,{ mes "type @points to check points anywhere"; OnPOINTS: dispbottom "Your total cash points is "+#ROKPOINTS+"."; end; OnInit: bindatcmd "points",strnpcinfo(3)+"::OnPOINTS"; end; } I put your script sir and the result said the i have 0 points even if i tried to convert ROK points Quote Link to comment Share on other sites More sharing options...
0 Sryx Posted April 20, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 520 Reputation: 64 Joined: 11/19/11 Last Seen: October 19, 2024 Share Posted April 20, 2017 6 hours ago, Jniko said: I put your script sir and the result said the i have 0 points even if i tried to convert ROK points dispbottom "Your total cash points is "+#ROK_POINTS+"."; Change the #ROKPOINTS to #ROK_POINTS 1 Quote Link to comment Share on other sites More sharing options...
0 Jniko Posted April 23, 2017 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 2 Joined: 03/24/17 Last Seen: February 4, 2020 Author Share Posted April 23, 2017 On 4/21/2017 at 6:43 AM, Sryx said: dispbottom "Your total cash points is "+#ROK_POINTS+"."; Change the #ROKPOINTS to #ROK_POINTS I tried but i think the problem is not the checker of ROK Points but the converter. Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted April 23, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted April 23, 2017 (edited) 10 minutes ago, Jniko said: I tried but i think the problem is not the checker of ROK Points but the converter. prt_in,38,107,7 script Meleis 97,{ set .@coinid,7179; mes "[^0000FFMelies^000000]"; mes "Hi ^ff8800"+strcharinfo(0)+"^000000,"; mes "What can i do for you?"; mes "The Exchange ratio is 10:1"; mes "Your RoK Point: [^ff0000"+#ROK_POINTS+"^000000]"; switch(select("Cancel: coins to RoK points:RoK points to Chaos coins")) { case 1: break; case 2: next; mes "[^0000FFMelies^000000]"; mes "Please input the amount of coins that you want to exchange."; mes "Note: Put ^0000ff0^000000 to exit."; L_inpcoin: input @hcoins; set @hhcoins,@hcoins; if(@hhcoins == 0) { break; } if(countitem(.@coinid) < @hhcoins) { mes "* ^ff0000Please input a valid amount^000000"; mes "(Put ^0000ff0^000000 to exit)."; goto L_inpcoin; } next; delitem .@coinid,@hhcoins; set #ROK_POINTS,#ROK_POINTS+@hhcoins; mes "[^0000FFMeleis^000000]"; mes "You've exchanged (^ff0000"+@hhcoins+"^000000) "+getitemname(.@coinid)+"(s). Total RoK Points: [^0000ff"+#ROK_POINTS+"^000000]"; dispbottom "[Meleis] You've exchanged ("+@hhcoins+") "+getitemname(.@coinid)+"(s). Total RoK Points: ["+#ROK_POINTS+"]"; break; case 3: next; mes "[^0000FFMeleis^000000]"; mes "Please input the amount of RoK that you want to exchange."; mes "Note: Put ^0000ff0^000000 to exit."; L_inpcash: input @hcash; set @hhcash,@hcash; if(@hhcash == 0) { break; } if(#ROK_POINTS < @hhcash) { mes "* ^ff0000Please input a valid amount^000000"; mes "(Put ^0000ff0^000000 to exit)."; goto L_inpcash; } //I know they weight 0 but just in case you change its weight if (!checkweight(.@coinid,@hhcash)) { mes "* ^ff0000You're overweight please store some items.^000000"; dispbottom "[Meleis] You're overweight please store some items."; break; } next; set #ROK_POINTS,#ROK_POINTS - @hhcash; getitem .@coinid,@hhcash; mes "[^0000FFMeleis^000000]"; mes "You've exchanged (^ff0000"+@hhcash+"^000000) RoK Points to "+getitemname(.@coinid)+"(s). Total RoK Points: [^0000ff"+#ROK_POINTS+"^000000]"; dispbottom "[Meleis] You've exchanged ("+@hhcash+") RoK Points to "+getitemname(.@coinid)+"(s). Total RoK Points: ["+#ROK_POINTS+"]"; break; } close; OnInit: waitingroom "RoK Exchanger",0; end; } try this script Edited April 23, 2017 by Cyro 1 Quote Link to comment Share on other sites More sharing options...
0 Jniko Posted April 23, 2017 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 2 Joined: 03/24/17 Last Seen: February 4, 2020 Author Share Posted April 23, 2017 (edited) 3 minutes ago, Cyro said: prt_in,38,107,7 script Meleis 97,{ set .@coinid,7179; mes "[^0000FFMelies^000000]"; mes "Hi ^ff8800"+strcharinfo(0)+"^000000,"; mes "What can i do for you?"; mes "The Exchange ratio is 10:1"; mes "Your RoK Point: [^ff0000"+#ROK_POINTS+"^000000]"; switch(select("Cancel:Chaos coins to RoK points:RoK points to Chaos coins")) { case 1: break; case 2: next; mes "[^0000FFMelies^000000]"; mes "Please input the amount of coins that you want to exchange."; mes "Note: Put ^0000ff0^000000 to exit."; L_inpcoin: input @hcoins; set @hhcoins,@hcoins; if(@hhcoins == 0) { break; } if(countitem(.@coinid) < @hhcoins) { mes "* ^ff0000Please input a valid amount^000000"; mes "(Put ^0000ff0^000000 to exit)."; goto L_inpcoin; } next; delitem .@coinid,@hhcoins; set #ROK_POINTS,#ROK_POINTS+@hhcoins; mes "[^0000FFMeleis^000000]"; mes "You've exchanged (^ff0000"+@hhcoins+"^000000) "+getitemname(.@coinid)+"(s). Total RoK Points: [^0000ff"+#ROK_POINTS+"^000000]"; dispbottom "[Meleis] You've exchanged ("+@hhcoins+") "+getitemname(.@coinid)+"(s). Total RoK Points: ["+#ROK_POINTS+"]"; break; case 3: next; mes "[^0000FFMeleis^000000]"; mes "Please input the amount of RoK that you want to exchange."; mes "Note: Put ^0000ff0^000000 to exit."; L_inpcash: input @hcash; set @hhcash,@hcash; if(@hhcash == 0) { break; } if(#ROK_POINTS < @hhcash) { mes "* ^ff0000Please input a valid amount^000000"; mes "(Put ^0000ff0^000000 to exit)."; goto L_inpcash; } //I know they weight 0 but just in case you change its weight if (!checkweight(.@coinid,@hhcash)) { mes "* ^ff0000You're overweight please store some items.^000000"; dispbottom "[Meleis] You're overweight please store some items."; break; } next; set #ROK_POINTS,#ROK_POINTS - @hhcash; getitem .@coinid,@hhcash; mes "[^0000FFMeleis^000000]"; mes "You've exchanged (^ff0000"+@hhcash+"^000000) RoK Points to "+getitemname(.@coinid)+"(s). Total RoK Points: [^0000ff"+#ROK_POINTS+"^000000]"; dispbottom "[Meleis] You've exchanged ("+@hhcash+") RoK Points to "+getitemname(.@coinid)+"(s). Total RoK Points: ["+#ROK_POINTS+"]"; break; } close; OnInit: waitingroom "RoK Exchanger",0; end; } try this script It is working cyro but it is for coins, do have anything for proof of donation to rok or Cashpoint? Edited April 23, 2017 by Jniko add some words Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted April 23, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted April 23, 2017 (edited) 1 minute ago, Jniko said: It is working cyro but it is for coins, do have anything for proof of donation to rok? this script work for POD to ROK only Edited April 23, 2017 by Cyro Quote Link to comment Share on other sites More sharing options...
0 Jniko Posted April 23, 2017 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 2 Joined: 03/24/17 Last Seen: February 4, 2020 Author Share Posted April 23, 2017 8 minutes ago, Cyro said: this script work for POD to ROK only oh I see my apologies cyro, thank you for the script. 1 Quote Link to comment Share on other sites More sharing options...
0 Jniko Posted April 23, 2017 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 42 Reputation: 2 Joined: 03/24/17 Last Seen: February 4, 2020 Author Share Posted April 23, 2017 12 minutes ago, Cyro said: this script work for POD to ROK only Cyro i do have one question, how can I set the ratio of 1POD=50ROk? Quote Link to comment Share on other sites More sharing options...
Question
Jniko
Good day guys! I am trying to generate an NPC which converts PODS to ROK POINTS.
Currently I have this scripts.
prontera,155,181,5 script Sample 757,{ .@pod = countitem( 7179 ); if( .@pod ){ delitem 7179,.@pod; #ROK_POINTS += ( 50 * .@pod ); //#ROK_POINTS += .@pod; npctalk "You gained "+.@pod+" ROK Points. Total : "+#ROK_POINTS+" points."; } end; }
But when I clicked the NPC nothing happens
Can anyone have some solution to this problem?
Thanks in advance
Edited by SkormUse code brakets
Link to comment
Share on other sites
14 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.