Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int lastscr[2];
- //Call in your active script, prior to Waitdraw();
- void ClearAmulet()
- {
- if ( lastscr[0] != Game->GetCurDMap() && lastscr[1] != Game->GetCurScreen() )
- {
- lastscr[0] = Game->GetCurDMap(); lastscr[1] = Game->GetCurScreen();
- Link->Item[I_AMULET1] = false; //clear tempAmulet on screen change of any kind.
- }
- }
- //Place on a custom item class item, assign a magic cost if desired.
- //D0: The sound effect to use.
- item script TempAmulet
- {
- void run(int sfx)
- {
- Link->Item[I_AMULET1] = true;
- }
- }
- global script AmuletExample
- {
- void run()
- {
- while(1)
- {
- ClearAmulet();
- Waitdraw();
- Waitframe();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement