Jump to content

SpiritD

Members
  • Posts

    75
  • Joined

  • Last visited

Community Answers

  1. SpiritD's post in R> a NPC that change "YPoints" to x1 Random Item [Solved] was marked as the answer   
    MAP,X,Y,Z script GamblerNPC::spiritD 400,{ if(#CASHPOINTS == 0){ mes "You don't have enough points"; close; } if(#CASHPOINTS > 0){ mes "You have "+#CASHPOINTS+" cash points."; mes "One roll costs 1 cash point."; mes "Would you like to roll?"; switch(select("No thanks:Yes please")){ case 1: close; case 2: #CASHPOINTS--; //subtract CASHPOINTS by 1 .@winNum = rand(4); //5 prizes to choose from (0-4) if(.@winNum == 0){ getitem <PRIZE_ID>,1; } if(.@winNum == 1){ getitem <PRIZE_ID>,1; } if(.@winNum == 2){ getitem <PRIZE_ID>,1; } if(.@winNum == 3){ getitem <PRIZE_ID>,1; } if(.@winNum == 4){ getitem <PRIZE_ID>,1; } else { debugmes "[GamblerNPC] "+strcharinfo(0)+" is a hacker!!"; } mes "Congrats!"; close; } } } Fill in your own NPC coordinates and prizes 
  2. SpiritD's post in Req Race to Max lvl Reward giver NPC was marked as the answer   
    prt_fild08,158,361,0 script maxLevelRace -1,{ OnPCBaseLvUpEvent: if(baseLvl == 99 && $raceEventCap <= 50) { //initiate when a player reaches level 99 AND the event cap has not been reached $raceEventCap++; announce strcharinfo(0)+" has won the race to level 99! "+$raceEventCap+"/50"; //you can reward here end; } else { end; } } warning - I don't know how to use variables  
    edit: I checked the variable type and I had it wrong. Use $variable for GLOBAL variable - not just attached to the character.
     
×
×
  • Create New...