Jump to content
  • 0

PODS converter to ROK POINTS


Jniko

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  42
  • Reputation:   2
  • Joined:  03/24/17
  • Last Seen:  

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 Skorm
Use code brakets
Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

Maybe you clicked the npc without Item ID 7179 in your inventory?

Edited by Technoken
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

This is whole script? 

Where is line

Set #ROK_POINTS

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

@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.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  42
  • Reputation:   2
  • Joined:  03/24/17
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

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;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  42
  • Reputation:   2
  • Joined:  03/24/17
  • Last Seen:  

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

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  520
  • Reputation:   64
  • Joined:  11/19/11
  • Last Seen:  

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

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  42
  • Reputation:   2
  • Joined:  03/24/17
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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 by Cyro
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  42
  • Reputation:   2
  • Joined:  03/24/17
  • Last Seen:  

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 by Jniko
add some words
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

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 by Cyro
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  42
  • Reputation:   2
  • Joined:  03/24/17
  • Last Seen:  

8 minutes ago, Cyro said:

this script work for POD to ROK only

oh I see my apologies cyro, thank you for the script.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.01
  • Content Count:  42
  • Reputation:   2
  • Joined:  03/24/17
  • Last Seen:  

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...