Jump to content
  • 0

how can add the entrance Fee is 5 TCG


Question

Posted (edited)
//The Warper to GoldRoom

prontera.gat,143,179,5	script	Gold Room Warper	813,{
switch( select( "Enter Greedy Points Room",
	    "Exchange Points to "+getitemname(.GoldID),
	    "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(.GoldID)+" ?";
  mes "Each "+getitemname(.GoldID)+" = "+.Rate+" Points.";
  if( #Points >= .Rate ){
   input .@Amount,1,#Points;
   set .@Calculation,( .@Amount / .Rate );
   if( .@Calculation ){
	    set #Points,#Points - ( .@Calculation * .Rate );
	    getitem 969,.@Calculation;
	    mes "Gained "+.@Calculation+" x "+getitemname(.GoldID);
   }
  }
  close;
Case 3: mes "You got "+#Points+" Greedy Points.";
default: break;
}
close;
OnInit:
set .Map$,"guild_vs5";
set .GoldID,969;
set .Rate,1;
monster .Map$,0,0,1950,100,strnpcinfo(0)+"::OnKilled";
end;
OnNPCKillEvent:
set .@cpoint_amt, 5;
set #Points,#Points + .@cpoint_amt;
monster .Map$,0,0,1950,100,strnpcinfo(0)+"::OnKilled";
dispbottom "You Currently Have " +#Points +" Greedy Points";
end;
}
guild_vs5,0,0,0,0	monster	Gold Miner Wanderer	1950,10,0,0,0

//put this on mobdb2
//1950,Gold_Miner_Wanderer,Gold Miner 

Wanderer,300,4445660,0,1,1,3,6812,10483,100,100,255,255,255,255,255,255,10,12,2,6,88,3973,150,10,816,504,0,0,0,,0,,0,,0,,0,,0

,,0,,0,,0,,0,,0,,0,,0,

 hello how can add the entrance Fee is 5 TCG

 

 

 and i got debug i dont know how to fix

9pqqn9.jpg

Edited by Phantom Of Rogue-Gon

7 answers to this question

Recommended Posts

Posted (edited)

Change:

Case 1: warp .Map$,0,0; end;

INTO:

Case 1: 
if( countitem( XXXX ) != 5 ){end;}
delitem( XXXX,5 );
warp .Map$,0,0; end;

Lastly, Replace, the " XXXX " into the ID of TCG item.

CBF looking for the ID lol.

 

Edit:

To fix your errors change:

monster .Map$,0,0,1950,100,strnpcinfo(0)+"::OnKilled";

INTO:

monster .Map$,0,0,""+ getmonsterinfo(0) +"",1950,100,strnpcinfo(0)+"::OnKilled";

*Note - Not sure if, using getmonsterinfo command without quotations will be accepted, so I used them to be safe.

Edited by Lionhardt
Posted

Try changing :

monster .Map$,0,0,""+ getmonsterinfo(0) +"",1950,100,strnpcinfo(0)+"::OnKilled";

to : 

monster .Map$,0,0,""+ getmonsterinfo(1950, 0) +"",1950,100,strnpcinfo(0)+"::OnKilled";
Posted

Uhh, yea. That is because your Original Script isn't complete at all. All I did was make the changes you requested for, but it seems who ever made your script originally, messed up. It wouldn't have worked either way. At any rate here is what you can do to fix it.

Change:

OnNPCKillEvent:

INTO:

OnKilled:

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