Jump to content
  • 0

PODS converter to ROK POINTS


Question

Posted (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 by Skorm
Use code brakets

14 answers to this question

Recommended Posts

  • 0
Posted

@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
  • 0
Posted
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.

  • 0
Posted
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
  • 0
Posted

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
  • 0
Posted
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

 

  • 0
Posted
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
  • 0
Posted
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.

  • 0
Posted (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 by Cyro
  • Upvote 1
  • 0
Posted (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 by Jniko
add some words
  • 0
Posted (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 by Cyro
  • 0
Posted
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?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...