Emistry

[RO] OnRentalExpireEvent

Dec 29th, 2015
389
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.24 KB | None | 0 0
  1. // https://github.com/HerculesWS/Hercules/pull/1046
  2.  
  3.     prontera,155,171,5  script  Sample#rental_test  4_PORING,{
  4.         rentitem 5353,1; // Helm of Sun rent for 1 seconds.
  5.         end;
  6.     }
  7.    
  8.     -   script  rental_1    -1,{
  9.        
  10.         OnRentalExpireEvent:
  11.             // do whatever you want here when item expired.
  12.             dispbottom " ---- Item Expired ---- ";
  13.             dispbottom " > @expire_itemid = "+@expire_itemid;
  14.             dispbottom " > @expire_refine = "+@expire_refine;
  15.             dispbottom " > @expire_identify = "+@expire_identify;
  16.             dispbottom " > @expire_attribute = "+@expire_attribute;
  17.             dispbottom " > @expire_bound = "+@expire_bound;
  18.             dispbottom " > @expire_uniqueid = "+@expire_uniqueid;
  19.             dispbottom " > @expire_card[0] = "+getitemname( @expire_card[0] );
  20.             dispbottom " > @expire_card[1] = "+getitemname( @expire_card[1] );
  21.             dispbottom " > @expire_card[2] = "+getitemname( @expire_card[2] );
  22.             dispbottom " > @expire_card[3] = "+getitemname( @expire_card[3] );
  23.            
  24.             // must clear variables to avoid possible exploit !!
  25.             // especially with multiple NPCs running same label
  26.             @expire_itemid = 0;
  27.             @expire_refine = 0;
  28.             @expire_identify = 0;
  29.             @expire_attribute = 0;
  30.             @expire_bound = 0;
  31.             @expire_uniqueid = 0;
  32.             deletearray @expire_card;
  33.             end;
  34.            
  35.     }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment