Advertisement
dreamunreal

infinity SC

Mar 26th, 2011
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.13 KB | None | 0 0
  1. src\map\script.c
  2. found:
  3. // declarations that were supposed to be exported from npc_chat.c
  4. #ifdef PCRE_SUPPORT
  5. BUILDIN_FUNC(defpattern);
  6. BUILDIN_FUNC(activatepset);
  7.  
  8.  
  9. add before:
  10. /// Starts a infinity status effect on the target unit or on the attached player.
  11. ///
  12. /// sc_start0 <effect_id>,<val1>,<val2>,<val3>,<val4>{,<unit_id>};
  13. BUILDIN_FUNC(sc_start0)
  14. {
  15.     struct block_list* bl;
  16.     enum sc_type type;
  17.     int val1 = 0, val2 = 0; val3 = 0, val4 = 0;
  18.  
  19.     type = (sc_type)script_getnum(st,2);
  20.     val1 = script_getnum(st,3);
  21.     val2 = script_getnum(st,4);
  22.     val3 = script_getnum(st,5);
  23.     val4 = script_getnum(st,6);
  24.     if( script_hasdata(st,7) )
  25.         bl = map_id2bl( script_getnum(st,7) );
  26.     else
  27.         bl = map_id2bl(st->rid);
  28.  
  29.     if( bl )
  30.         status_change_start(bl, type, 10000, val1, val2, val3, val4, -1, 18);
  31.  
  32.     return 0;
  33. }
  34.  
  35.  
  36. found:
  37.     BUILDIN_DEF(changequest, "ii"),
  38.     BUILDIN_DEF(showevent, "ii"),
  39.  
  40. add after:
  41.     BUILDIN_DEF(sc_start0, "iiiiii?"),
  42.  
  43.  
  44. src\map\status.c
  45.  
  46. found:
  47.     if( !(flag&(1|4)) )
  48.     {
  49.         tick = status_get_sc_def(bl, type, rate, tick, flag);
  50.         if( !tick ) return 0;
  51.     }
  52.  
  53. add after:
  54.     if( flag&16 )
  55.     {
  56.         tick == -1;
  57.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement