Jump to content
  • 0

Points to TCG exchanger (error HELP)


NexusXVI

Question


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Disclamer : This is not my script, I only found it in rathena :)

 

I am having problems making it work and I need help.

 

Here is the script :

 

dewata,186,178,5	script	Points Manager	106,{
switch( select( "Enter Greedy Points Room",
	    "Exchange Points to "+getitemname(.CoinID),
	    "Check Points",
	    "Exit" ) ){
Case 1: warp .Map$,0,0; end;
Case 2:
  mes "You got "+#Points+" Points.";
  mes "How many will be used to change into "+getitemname(.CoinID)+" ?";
  mes "Each "+getitemname(.CoinID)+" = "+.Rate+" Points.";
  if( #Points >= .Rate ){
   input .@Amount,0,#Points;
   set .@Calculation,( .@Amount / .Rate );
   if( .@Calculation ){
	    set #Points,#Points - ( .@Calculation * .Rate );
	    getitem 7227,.@Calculation;
	    mes "Gained "+.@Calculation+" x "+getitemname(.CoinID);
   }
  }
  close;
Case 3: mes "You got "+#Points+" Greedy Points.";
default: break;
}
close;
OnInit:
set .Map$,"guild_vs5";
set .CoinID,7227;
set .Rate,10;
monster .Map$,0,0,1906,100,strnpcinfo(0)+"::OnKilled";
end;
OnNPCKillEvent:
set #Points,#Points + rand(1);
monster .Map$,0,0,1906,1,strnpcinfo(0)+"::OnKilled";
dispbottom "You Currently Have " +#Points +" Greedy Points";
end;
}
guild_vs5,0,0,0,0 monster Greedy Barricade 1906,10,0,0,0
guild_vs5,0,0,0,0 monster Greedy Barricade 1906,10,0,0,0
guild_vs5,0,0,0,0 monster Greedy Barricade 1906,10,0,0,0

 

Here is the error:

Untitled_zps7f85412b.jpg

 

 

 

Thanks in advance :)

Edited by NexusXVI
Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Sir no points is being added even thou I already set it to +1

no error on map server

 

dewata,186,178,5	script	Points Manager	106,{
switch( select( "Enter Greedy Points Room",
	    "Exchange Points to "+getitemname(.CoinID),
	    "Check Points",
	    "Exit" ) ){
Case 1: warp .Map$,0,0; end;
Case 2:
  mes "You got "+#Points+" Points.";
  mes "How many will be used to change into "+getitemname(.CoinID)+" ?";
  mes "Each "+getitemname(.CoinID)+" = "+.Rate+" Points.";
  if( #Points >= .Rate ){
   input .@Amount,0,#Points;
   set .@Calculation,( .@Amount / .Rate );
   if( .@Calculation ){
	    set #Points,#Points - ( .@Calculation * .Rate );
	    getitem 7227,.@Calculation;
	    mes "Gained "+.@Calculation+" x "+getitemname(.CoinID);
   }
  }
  close;
Case 3: mes "You got "+#Points+" Greedy Points.";
default: break;
}
close;
OnInit:
set .Map$,"guild_vs5";
set .CoinID,7227;
set .Rate,10;
monster .Map$,0,0,"NAME",1906,1,strnpcinfo(0)+"::OnKilled";
end;
OnKilled:
set #Points,#Points + 1;
monster .Map$,0,0,"NAME",1906,1,strnpcinfo(0)+"::OnKilled";
dispbottom "You Currently Have " +#Points +" Greedy Points";
end;
}
guild_vs5,0,0,0,0	monster	Greedy Barricade	1906,15,0,0,0
guild_vs5,0,0,0,0	monster	Greedy Barricade	1906,15,0,0,0
guild_vs5,0,0,0,0	monster	Greedy Barricade	1906,15,0,0,0


Fixed it Thnx

Edited by NexusXVI
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Ok!!! Thank you for teaching me that sir. I'll try that and update you with the result.

Edited by NexusXVI
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

should be

OnKilled:
set #Points,#Points + rand(1);
monster .Map$,0,0,1906,1,strnpcinfo(0)+"::OnKilled";
dispbottom "You Currently Have " +#Points +" Greedy Points";
end;
guild_vs5,0,0,0,0 monster Greedy Barricade 1906,10,0,0,"Points Manager::OnKilled"
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

 

Thanks for Introducing me to that part, learned a lot and removed the syntax error.

@Emistry

Used the txt you've given me sir but a couple of warnings still persist

 

Untitled_zps9d7abdeb.jpg

Addition :

Tried the npc and when I kill a barrier an error on the map server appear

npc_event: event not found [0"Points Manager: :OnKilled]

Edited by NexusXVI
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


monster .Map$,0,0,"NAME",1906,1,strnpcinfo(0)+"::OnKilled";

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Yup that solves it ALL!! /no1 /no1 /kis2 /kis2 /ok /ok

 

Omg sorry sir Emistry but still a couple of error :

at map server when the npc is loaded it shows nothing but when I kill a monster
this error shows up again :(

Untitled_zps9d7abdeb.jpg

Edited by NexusXVI
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


monster .Map$,0,0,"NAME",1906,1,strnpcinfo(0)+"::OnKilled";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

No error now :) but cant get any points
How to make it 1 point per kill?

Edited by NexusXVI
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

set #Points,#Points + 1;

if you want to use random point...refer rand

  • Upvote 1
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...