SHARE
TWEET

Untitled

a guest May 19th, 2017 30 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /////////////////////////////////////////////////////////////////////////////////////
  2. INCLUDE Include/AutoAugEngine.l2c
  3. INCLUDE StdLib/player.l2c
  4. DEFINE_GLOBAL AugEngine AA_ScrObj 0
  5. /////////////////////////////////////////////////////////////////////////////////////
  6.  
  7.  
  8.  
  9.  
  10. // CHANGE THE WEAPON NAME WITH THE EXACT NAME OF YOURS
  11. AA_ScrObj.WRK_ITEM.NAME = "#$Staff of Evil Spirits"
  12.  
  13. // CHANGE THE LIFE STONE NAME WITH THE EXACT NAME OF YOURS
  14. AA_ScrObj.WRK_LS.NAME = "#$Top-Grade Life Stone: level 76"
  15.  
  16.  
  17. // CHANGE FOR WHAT AUGMENT CONFIGURATION YOU WANT
  18. // #i1 - just skills ; #i2 - just base stat
  19. // #i3 - skills or base stat
  20. // #i4 - skills and base stat <- THIS COULD NEVER HAPPEN
  21. AA_ScrObj.AUG_TYPE = #i1
  22.  
  23.  
  24. // ADD THE SKILL ID THAT ARE YOU LOOKING FOR(if you don't want just the base stat)
  25. AA_ScrObj.CHOSE_SKILL.ADD #i3124
  26. AA_ScrObj.CHOSE_SKILL.ADD #i3135
  27. // ...YOU CAND ADD MORE OR REMOVE AND KEEP JUST ONE
  28.  
  29.  
  30. // #$STR - for STR+1
  31. // #$CON - for CON+1
  32. // #$MEN - for MEN+1
  33. // #$INT - for INT+1
  34. // CHANGE BELOW FOR WHAT BASE STAT YOU WANT(if you don't want just the skills)
  35. AA_ScrObj.BASE_STAT = #$STR
  36.  
  37.  
  38.  
  39.  
  40. // CHANGE TO "TRUE" TO ADD THE 2 SECONDS DELAY, LIKE INGAME,
  41. // WHEN ADDING OR REMOVING AUGMENTATION
  42. AA_ScrObj.PROTECT_DELAY = FALSE
  43.  
  44. // CHANGE TO "FALSE" IF YOU DON'T WANT TO SAVE LOGS
  45. AA_ScrObj.SAVE_LOG = TRUE
  46. // NUMBER OF LOG LINES PER FILE
  47. AA_ScrObj.LOG_LINES = #i2000
  48.  
  49.  
  50. // NPC DIALOG STRINGS, NEED TO CHNAGE ONLY IF THEY DIFFER (FOR RETAIL THIS IS A MUST)
  51. AA_ScrObj.NPC_DIAG11 = "#$bypass -h npc_<&TARGET_ID&>_Link common/augmentation_01.htm"
  52. AA_ScrObj.NPC_DIAG12 = "#$bypass -h npc_<&TARGET_ID&>_Augment 1"
  53. AA_ScrObj.NPC_DIAG21 = "#$bypass -h npc_<&TARGET_ID&>_Link common/augmentation_02.htm"
  54. AA_ScrObj.NPC_DIAG22 = "#$bypass -h npc_<&TARGET_ID&>_Augment 2"
  55.  
  56.  
  57.  
  58.  
  59.  
  60. // DON'T CHANGE NOTHING BELOW (ONLY IF YOU KNOW WHAT ARE YOU DOING)
  61. /////////////////////////////////////////////////////////////////////////////////////
  62. /////////////////////////////////////////////////////////////////////////////////////
  63.  
  64. //for event anti stuck
  65. DEFINE_GLOBAL STRING EVT_LABEL ""
  66. THREAD EVT_ANTI_STUCK
  67. LOCK ASTK
  68. IF AA_ScrObj.SAVE_LOG == TRUE
  69.     THREAD LOG_N_PROTECT
  70. ENDIF
  71. AA_ScrObj.LOAD_AND_CHECK
  72.  
  73. PRINT_TEXT "====================================="
  74. PRINT_TEXT "== Gemstone grade and count will be verified on augmentation process."
  75. PRINT_TEXT "====================================="
  76. PRINT_TEXT "== '<&AA_ScrObj.WRK_LS.NAME&>' x <&AA_ScrObj.LS_COUNT&>"
  77. PRINT_TEXT "== 'Adena' x <&AA_ScrObj.ADENA_COUNT&>"
  78. PRINT_TEXT "== "
  79. PRINT_TEXT "== '<&AA_ScrObj.WRK_ITEM.NAME&>' +<&AA_ScrObj.WRK_ITEM.ENCHANT&>"
  80. AA_ScrObj.PRINT_AUGMENT
  81. PRINT_TEXT "====================================="
  82. PRINT_TEXT "= You have 15 seconds to stop the script if something it's wrong."
  83. PRINT_TEXT "====================================="
  84. SLEEP 15000
  85.  
  86. DO
  87.     IF AA_ScrObj.HAS_AUG == FALSE
  88.         ADD_AUGMENT
  89.     ELSE
  90.         REMOVE_AUGMENT
  91.     ENDIF
  92. LOOP ONE == ONE
  93.  
  94. AA_ScrObj.SCRIPT_END
  95.  
  96. FUNCTION CHECK_DIAG 0
  97.     UNLOCK ASTK
  98.     EVT_SET VOID 2 #$_subdchk1 #i25
  99.     AA_ScrObj.S_RAND_500
  100.     TALK_TARGET
  101.     SLEEP 500
  102.     LOCK DIAG_EVT_CHK
  103.     SLEEP 50
  104.     UNLOCK DIAG_EVT_CHK
  105. RETURN VOID
  106.  
  107. FUNCTION _subdchk1 0
  108.     UNSET_EVENT VOID 1 #i25
  109.     DEFINE STRING _html 0
  110.     PACKET.READ_BYTE NULL
  111.     PACKET.READ_INT32 NULL
  112.     PACKET.READ_STRING _html
  113.     IF "_html.CONTAINS AA_ScrObj.NPC_DIAG11" == FALSE
  114.         AA_ScrObj.NPC_DIAG_NOMATCH
  115.     ELSE
  116.         EVT_SET VOID 2 #$_subdchk2 #i25
  117.         AA_ScrObj.S_RAND_500
  118.         NPC_DIALOG "<&AA_ScrObj.NPC_DIAG11&>"
  119.     ENDIF
  120.     SLEEP 300
  121. RETURN VOID
  122.  
  123. FUNCTION _subdchk2 0
  124.     UNSET_EVENT VOID 1 #i25
  125.     DEFINE STRING _html 0
  126.     PACKET.READ_BYTE NULL
  127.     PACKET.READ_INT32 NULL
  128.     PACKET.READ_STRING _html
  129.     IF "_html.CONTAINS AA_ScrObj.NPC_DIAG12" == FALSE
  130.         AA_ScrObj.NPC_DIAG_NOMATCH
  131.     ELSE
  132.         EVT_SET VOID 2 #$_subdchk3 #i25
  133.         AA_ScrObj.S_RAND_500
  134.         TALK_TARGET
  135.     ENDIF
  136.     SLEEP 300
  137. RETURN VOID
  138.  
  139. FUNCTION _subdchk3 0
  140.     UNSET_EVENT VOID 1 #i25
  141.     DEFINE STRING _html 0
  142.     PACKET.READ_BYTE NULL
  143.     PACKET.READ_INT32 NULL
  144.     PACKET.READ_STRING _html
  145.     IF "_html.CONTAINS AA_ScrObj.NPC_DIAG21" == FALSE
  146.         AA_ScrObj.NPC_DIAG_NOMATCH
  147.     ELSE
  148.         EVT_SET VOID 2 #$_subdchk4 #i25
  149.         AA_ScrObj.S_RAND_500
  150.         NPC_DIALOG "<&AA_ScrObj.NPC_DIAG21&>"
  151.     ENDIF
  152.     SLEEP 300
  153. RETURN VOID
  154.  
  155. FUNCTION _subdchk4 0
  156.     UNSET_EVENT VOID 1 #i25
  157.     DEFINE STRING _html 0
  158.     PACKET.READ_BYTE NULL
  159.     PACKET.READ_INT32 NULL
  160.     PACKET.READ_STRING _html
  161.     IF "_html.CONTAINS AA_ScrObj.NPC_DIAG22" == FALSE
  162.         AA_ScrObj.NPC_DIAG_NOMATCH
  163.     ENDIF
  164.     SLEEP 100
  165.     LOCK ASTK
  166.     UNLOCK DIAG_EVT_CHK
  167. RETURN VOID
  168.  
  169.  
  170. FUNCTION ADD_AUGMENT
  171.     UNLOCK ASTK
  172.     AA_ScrObj.CHK_STOK
  173.     PRINT_TEXT "== Augmenting item..."
  174.     PRINT_TEXT "====================================="
  175.     EVT_SET VOID 2 #$_add_interogate #i25
  176.     AA_ScrObj.S_RAND_300
  177.     TALK_TARGET
  178.     SLEEP 500
  179.     LOCK ADMAG
  180.     SLEEP 50
  181.     UNLOCK ADMAG
  182. RETURN VOID
  183.  
  184. FUNCTION _add_interogate
  185. //  LOCK ADMAG
  186.     UNSET_EVENT VOID 1 #i25
  187.     EVT_SET VOID 2 #$_add_navdiag11 #i25
  188.     AA_ScrObj.S_RAND_300
  189.     NPC_DIALOG "<&AA_ScrObj.NPC_DIAG11&>"
  190. RETURN VOID
  191.  
  192. FUNCTION _add_navdiag11
  193.     UNSET_EVENT VOID 1 #i25
  194.     EVTEX_SET VOID 2 #$_add_navdiag12 #i81
  195.     AA_ScrObj.S_RAND_300
  196.     NPC_DIALOG "<&AA_ScrObj.NPC_DIAG12&>"
  197. RETURN VOID
  198.  
  199. FUNCTION _add_navdiag12
  200.     UNSET_EVENTEX VOID 1 #i81
  201.     EVTEX_SET VOID 2 #$_add_insitem #i83
  202.     AA_ScrObj.ADD_ITEM
  203. RETURN VOID
  204.  
  205. FUNCTION _add_insitem
  206.     UNSET_EVENTEX VOID 1 #i83
  207.     EVTEX_SET VOID 2 #$_add_insls #i84
  208.     AA_ScrObj.ADD_LS
  209. RETURN VOID
  210.  
  211. FUNCTION _add_insls
  212.     UNSET_EVENTEX VOID 1 #i84
  213.     IF AA_ScrObj.AUG_TIMES < ONE
  214.         PACKET.READ_BYTE NULL
  215.         PACKET.READ_INT16 NULL
  216.         PACKET.READ_INT32 NULL
  217.         PACKET.READ_INT32 NULL
  218.         PACKET.READ_INT32 AA_ScrObj.WRK_GEM.ITEM_ID
  219.         PACKET.READ_INT32 AA_ScrObj.GEMS_REQ
  220.         AA_ScrObj.LOAD_GEMINF
  221.         IF AA_ScrObj.GEMS_COUNT <= AA_ScrObj.GEMS_REQ
  222.             PRINT_TEXT "Not enough Gemstones for augmentation."
  223.             AA_ScrObj.SCRIPT_END
  224.         ENDIF
  225.     ENDIF
  226.     EVTEX_SET VOID 2 #$_add_insgems #i85
  227.     AA_ScrObj.ADD_GEMS
  228. RETURN VOID
  229.  
  230. FUNCTION _add_insgems
  231.     UNSET_EVENTEX VOID 1 #i85
  232.     EVTEX_SET VOID 2 #$_add_confirm #i86
  233.     AA_ScrObj.CONFIRM_AUG
  234. RETURN VOID
  235.  
  236. FUNCTION _add_confirm
  237.     UNSET_EVENTEX VOID 1 #i86
  238.     PACKET.READ_BYTE NULL
  239.     PACKET.READ_INT16 NULL
  240.     AA_ScrObj.AUG_DATA.CLEAN
  241.     PACKET.READ_INT32 AA_ScrObj.AUG_DATA.LVAL
  242.     PACKET.READ_INT32 AA_ScrObj.AUG_DATA.RVAL
  243.     AA_ScrObj.COMPARE
  244.     LOCK ASTK
  245.     UNLOCK ADMAG
  246. RETURN VOID
  247.  
  248. FUNCTION REMOVE_AUGMENT
  249.     UNLOCK ASTK
  250.     PRINT_TEXT "== Removing augmentation..."
  251.     PRINT_TEXT "====================================="
  252.     EVT_SET VOID 2 #$_rem_interogate #i25
  253.     AA_ScrObj.S_RAND_300
  254.     TALK_TARGET
  255.     SLEEP 500
  256.     LOCK RVMAG
  257.     SLEEP 50
  258.     UNLOCK RVMAG
  259. RETURN VOID
  260.  
  261. FUNCTION _rem_interogate
  262.     //LOCK RVMAG
  263.     UNSET_EVENT VOID 1 #i25
  264.     EVT_SET VOID 2 #$_rem_navdiag21 #i25
  265.     AA_ScrObj.S_RAND_300
  266.     NPC_DIALOG "<&AA_ScrObj.NPC_DIAG21&>"
  267. RETURN VOID
  268.  
  269. FUNCTION _rem_navdiag21
  270.     UNSET_EVENT VOID 1 #i25
  271.     EVTEX_SET VOID 2 #$_rem_navdiag22 #i82
  272.     AA_ScrObj.S_RAND_300
  273.     NPC_DIALOG "<&AA_ScrObj.NPC_DIAG22&>"
  274. RETURN VOID
  275.  
  276. FUNCTION _rem_navdiag22
  277.     UNSET_EVENTEX VOID 1 #i82
  278.     EVTEX_SET VOID 2 #$_rem_insitem #i87   
  279.     AA_ScrObj.ARM_ITEM
  280. RETURN VOID
  281.  
  282. FUNCTION _rem_insitem
  283.     UNSET_EVENTEX VOID 1 #i87
  284.     IF AA_ScrObj.ADENA_REQ == ZERO
  285.         PACKET.READ_BYTE NULL
  286.         PACKET.READ_INT16 NULL
  287.         PACKET.READ_INT64 NULL
  288.         PACKET.READ_INT64 NULL
  289.         PACKET.READ_INT64 AA_ScrObj.ADENA_REQ
  290.     ENDIF
  291.     AA_ScrObj.CHK_ADENA
  292.     EVTEX_SET VOID 2 #$_rem_confirm #i88
  293.     AA_ScrObj.ARM_CONFIRM
  294. RETURN VOID
  295.  
  296. FUNCTION _rem_confirm
  297.     UNSET_EVENTEX VOID 1 #i88
  298.     AA_ScrObj.HAS_AUG = FALSE
  299.     PRINT_TEXT "====================================="
  300.     PRINT_TEXT "== Augmentation removed successfully."
  301.     PRINT_TEXT "== Proceeding to re-augmenting."
  302.     PRINT_TEXT "====================================="
  303.     LOCK ASTK
  304.     UNLOCK RVMAG
  305. RETURN VOID
  306.  
  307. FUNCTION LOG_WFILE
  308.     DEFINE INT _fcnt 1
  309.     DEFINE STRING _temptime ""
  310.     AA_ScrObj.TObj.LTIMER_START
  311.     AA_ScrObj.TObj.PGET_TIME _temptime
  312.     _temptime = "#$Auto augmentation started at <&_temptime&>, with:"
  313.     AA_ScrObj._logaug.PUSH _temptime
  314.     DO
  315.         IF AA_ScrObj._logaug.LENGTH >= AA_ScrObj.LOG_LINES
  316.             SLEEP 100
  317.             LOCK FLWRT
  318.             AA_ScrObj.TObj.SFN_DateTime AA_ScrObj._logfname
  319.             AA_ScrObj._logfname = "#$ALogAug_<&CHAR_NAME&>_<&_fcnt&>_<&AA_ScrObj._logfname&>"
  320.             PRINT_TEXT "writing augment logs to file..."
  321.             CALL_EXTERN "Include/Utils.l2s" WRITE_FILE VOID 3 AA_ScrObj._logfname AA_ScrObj._logaug #$w
  322.     //      WRITE_LOG
  323.             PRINT_TEXT "logs saved under <&AA_ScrObj._logfname&>.txt"
  324.             _fcnt = _fcnt + ONE
  325.             SLEEP 50
  326.             UNLOCK FLWRT
  327.         ENDIF
  328.         SLEEP 500
  329.     LOOP ONE == ONE
  330. RETURN VOID
  331.  
  332. FUNCTION WRITE_LOG
  333.     PRINT_TEXT "writing augment logs to file..."
  334.     DEFINE FILEWRITER _fwopened "<&AA_ScrObj._logfname&>"
  335.     WHILE AA_ScrObj._logaug.LENGTH > ZERO
  336.         _fwopened.WRITE AA_ScrObj._logaug.POP
  337.     WEND
  338.     _fwopened.FLUSH
  339.     _fwopened.CLOSE
  340.     PRINT_TEXT "logs saved under <&AA_ScrObj._logfname&>.txt"
  341. RETURN VOID
  342.  
  343. FUNCTION EVTEX_SET 2 _evt_func _evt_id
  344.     SET_EVENT "<&SCRIPTEVENT_SERVERPACKETEX&>" "<&SYSTEM_CURRENTFILE&>" "<&_evt_func&>" "<&_evt_id&>"
  345.     AA_ScrObj.S_RAND_300
  346.     EVT_LABEL = "#$<&_evt_func&>"
  347. RETURN VOID
  348.  
  349. FUNCTION EVT_SET 2 _evt_func _evt_id
  350.     SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" "<&_evt_func&>" "<&_evt_id&>"
  351.     AA_ScrObj.S_RAND_300
  352.     EVT_LABEL = "#$<&_evt_func&>"
  353.     IF #$_add_interogate == "#$<&_evt_func&>"
  354.         LOCK ADMAG
  355.     ENDIF
  356.     IF #$_rem_interogate == "#$<&_evt_func&>"
  357.         LOCK RVMAG
  358.     ENDIF
  359.     IF #$_subdchk1 == "#$<&_evt_func&>"
  360.         LOCK DIAG_EVT_CHK
  361.     ENDIF
  362. RETURN VOID
  363.  
  364. FUNCTION UNSET_EVENT 1 _evtid
  365.     SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" _nof "<&_evtid&>"
  366.     AA_ScrObj.S_RAND_100
  367.     EVT_LABEL = #$none
  368. RETURN VOID
  369.  
  370. FUNCTION UNSET_EVENTEX 1 _evtid
  371.     SET_EVENT "<&SCRIPTEVENT_SERVERPACKETEX&>" "<&SYSTEM_CURRENTFILE&>" _nof "<&_evtid&>"
  372.     AA_ScrObj.S_RAND_100
  373.     EVT_LABEL = #$none
  374. RETURN VOID
  375.  
  376. FUNCTION _nof
  377.     SLEEP 50
  378. RETURN VOID
  379.  
  380. FUNCTION EVT_ANTI_STUCK
  381.     DEFINE STRING _chkstuk ""
  382.     WHILE ONE == ONE
  383.         _chkstuk = EVT_LABEL
  384.         SLEEP 3000
  385.         LOCK ASTK
  386.         SLEEP 50
  387.         UNLOCK ASTK
  388.         IF ( _chkstuk == EVT_LABEL ) && ( EVT_LABEL != #$none )
  389.             PRINT_TEXT "anti stuck action..."
  390.             SWITCH EVT_LABEL
  391.                 CASE #$_add_interogate
  392.                 CASE #$_rem_interogate
  393.                 CASE #$_subdchk1
  394.                 CASE #$_subdchk3
  395.                     TALK_TARGET
  396.                     BREAK 1
  397.                 CASE #$_add_navdiag11
  398.                 CASE #$_subdchk2
  399.                     NPC_DIALOG "<&AA_ScrObj.NPC_DIAG11&>"
  400.                     BREAK 1
  401.                 CASE #$_add_navdiag12
  402.                     NPC_DIALOG "<&AA_ScrObj.NPC_DIAG12&>"
  403.                     BREAK 1
  404.                 CASE #$_add_insitem
  405.                     AA_ScrObj.ADD_ITEM
  406.                     BREAK 1
  407.                 CASE #$_add_insls
  408.                     AA_ScrObj.ADD_LS
  409.                     BREAK 1
  410.                 CASE #$_add_insgems
  411.                     AA_ScrObj.ADD_GEMS
  412.                     BREAK 1
  413.                 CASE #$_add_confirm
  414.                     AA_ScrObj.CONFIRM_AUG
  415.                     BREAK 1
  416.                 CASE #$_rem_navdiag21
  417.                 CASE #$_subdchk4
  418.                     NPC_DIALOG "<&AA_ScrObj.NPC_DIAG21&>"
  419.                     BREAK 1
  420.                 CASE #$_rem_navdiag22
  421.                     NPC_DIALOG "<&AA_ScrObj.NPC_DIAG22&>"
  422.                     BREAK 1
  423.                 CASE #$_rem_insitem
  424.                     AA_ScrObj.ARM_ITEM
  425.                     BREAK 1
  426.                 CASE #$_rem_confirm
  427.                     AA_ScrObj.ARM_CONFIRM
  428.                     BREAK 1
  429.             ENDSWITCH
  430.         ENDIF
  431.     WEND
  432. RETURN VOID
  433.  
  434. FUNCTION LOG_N_PROTECT
  435.     THREAD LOG_WFILE
  436.     AA_ScrObj.TObj.SFN_DateTime AA_ScrObj._evtlogfn
  437.     AA_ScrObj._evtlogfn = "#$ALogEvt_<&CHAR_NAME&>_<&AA_ScrObj._evtlogfn&>"
  438.     CALL_EXTERN "Include/Utils.l2s" WRITE_FILE VOID 3 AA_ScrObj._evtlogfn "#$" #$w
  439.     PRINT_TEXT "Log <&AA_ScrObj._evtlogfn&>.txt created"
  440.     SET_EVENT "<&SCRIPTEVENT_CHAT&>" "<&SYSTEM_CURRENTFILE&>" _chatter
  441.     SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" _ptinv 57
  442.     SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" _traderq 112
  443.     SET_EVENT "<&SCRIPTEVENT_SERVERPACKET&>" "<&SYSTEM_CURRENTFILE&>" _claninv 44
  444.     THREAD LOG_WRITER
  445. RETURN VOID
  446.  
  447. PUBLIC LOG_WRITER
  448.     WHILE ONE == ONE
  449.         SLEEP 300000
  450.         AA_ScrObj.EVT_LOGS_WR
  451.     WEND
  452. RETURN VOID
  453.  
  454. FUNCTION _chatter
  455.     IF MESSAGETYPE == TWO
  456.         AA_ScrObj.ADD_LMEM VOID 4 SENDERNAME MESSAGETYPE MESSAGE NULL
  457.     ELSE
  458.         IF "MESSAGE.CONTAINS CHAR_NAME" == TRUE
  459.             AA_ScrObj.ADD_LMEM VOID 4 SENDERNAME MESSAGETYPE MESSAGE TRUE
  460.             THREAD _allchtlog
  461.             SET_EVENT "<&SCRIPTEVENT_CHAT&>" "<&SYSTEM_CURRENTFILE&>" _logallchat
  462.             PRINT_TEXT "Your name was mentioned, logging all chat for 3 minutes..."
  463.         ENDIF
  464.     ENDIF
  465. RETURN VOID
  466.  
  467. FUNCTION _allchtlog
  468.     SLEEP 180000
  469.     SET_EVENT "<&SCRIPTEVENT_CHAT&>" "<&SYSTEM_CURRENTFILE&>" _chatter
  470.     PRINT_TEXT "Logging all chat stopped."
  471. RETURN VOID
  472.  
  473. FUNCTION _logallchat
  474.     AA_ScrObj.ADD_LMEM VOID 4 SENDERNAME MESSAGETYPE MESSAGE TRUE
  475. RETURN VOID
  476.  
  477. FUNCTION _ptinv
  478.     DEFINE STRING _crtime 0
  479.     AA_ScrObj.TObj.PGET_TIME _crtime
  480.     PACKET.READ_BYTE NULL
  481.     DEFINE STRING _tmppers ""
  482.     PACKET.READ_STRING _tmppers
  483.     AA_ScrObj._evtlogs.PUSH "#$    [<&_crtime&>]: Party invitation by <&_tmppers&>"
  484.     AA_ScrObj.S_RANDL_1500
  485.     INJECT "43 00 00 00 00" // reject party
  486. RETURN VOID
  487.  
  488. FUNCTION _traderq
  489.     DEFINE STRING _crtime 0
  490.     AA_ScrObj.TObj.PGET_TIME _crtime
  491.     DEFINE INT _astobj 0
  492.     PACKET.READ_BYTE NULL
  493.     PACKET.READ_INT32 _astobj
  494.     DEFINE STRING _tmppers ""
  495.     DEFINE ARRAYLIST _playersc 0
  496.     GET_PLAYERS _playersc
  497.     FOREACH _ixs Player _playersc
  498.         IF _playersc._ixs.ID == _astobj
  499.             _tmppers = "#$<&_playersc._ixs.NAME&>"
  500.             BREAK 2
  501.         ENDIF
  502.     NEXTEACH
  503.     AA_ScrObj._evtlogs.PUSH "#$    [<&_crtime&>]: Trade requeste by <&_tmppers&>"
  504.     AA_ScrObj.S_RANDL_1500
  505.     INJECT "55 00 00 00 00" // reject trade
  506. RETURN VOID
  507.  
  508. FUNCTION _claninv
  509.     DEFINE STRING _crtime 0
  510.     AA_ScrObj.TObj.PGET_TIME _crtime
  511.     DEFINE INT _astobj 0
  512.     PACKET.READ_BYTE NULL
  513.     PACKET.READ_INT32 _astobj
  514.     DEFINE STRING _tmppers ""
  515.     DEFINE ARRAYLIST _playersc 0
  516.     GET_PLAYERS _playersc
  517.     FOREACH _ixs Player _playersc
  518.         IF _playersc._ixs.ID == _astobj
  519.             _tmppers = "#$<&_playersc._ixs.NAME&>"
  520.             BREAK 2
  521.         ENDIF
  522.     NEXTEACH
  523.     AA_ScrObj._evtlogs.PUSH "#$    [<&_crtime&>]: Clan invitation by <&_tmppers&>"
  524.     AA_ScrObj.S_RANDL_1500
  525.     INJECT "27 00 00 00 00" // reject clan
  526. RETURN VOID
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top