ZoriaRPG

Temporary Amulet for Cukeman

Jun 19th, 2018
92
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int lastscr[2];
  2.  
  3. //Call in your active script, prior to Waitdraw();
  4. void ClearAmulet()
  5. {
  6.     if ( lastscr[0] != Game->GetCurDMap() && lastscr[1] != Game->GetCurScreen() )
  7.     {
  8.         lastscr[0] = Game->GetCurDMap(); lastscr[1] = Game->GetCurScreen();
  9.         Link->Item[I_AMULET1] = false; //clear tempAmulet on screen change of any kind.
  10.     }
  11. }
  12.  
  13. //Place on a custom item class item, assign a magic cost if desired.
  14. //D0: The sound effect to use.
  15. item script TempAmulet
  16. {
  17.     void run(int sfx)
  18.     {
  19.         Link->Item[I_AMULET1] = true;
  20.     }
  21. }
  22.  
  23. global script AmuletExample
  24. {
  25.     void run()
  26.     {
  27.         while(1)
  28.         {
  29.             ClearAmulet();
  30.             Waitdraw();
  31.             Waitframe();
  32.         }
  33.     }
  34. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×