Jump to content

sader1992

Content Moderator
  • Posts

    1676
  • Joined

  • Last visited

  • Days Won

    71

Everything posted by sader1992

  1. you can edit the cutin command script to accept char id at the end , and get the users list from the map using getmapunits and send the cutin in a for loop instead of attaching the players you can use this for reference on how to do it https://github.com/rathena/rathena/pull/4143/files if i am planing to do what you want to do , i would have done this from the start , because it's better to not attach a player when you can if it's a group of players
  2. cutin needs a player to be attached in the script first, OnTimer event does not attach any plyer checkout addrid command
  3. I had fun with that before however , it's not recommended i suggest to rethink your idea to make everything work inside the src this will spam events in the player's queue if it's misused!
  4. The code syntax that you provided is wrong getmapflag("<map name>",<flag>) || getmapflag("<map name>",<flag>) || getmapflag("<map name>",<flag>) not getmapflag("<map name>",<flag> || getmapflag("<map name>",<flag> || getmapflag("<map name>",<flag>)))
  5. close4 function not found, the error message is clear.
  6. search for the item id.
  7. Unknown Item with Apple icon = Iteminfo.lub/lua
  8. function script my_global_func { mes "this message from 'my_global_func' function from out the npc"; return; } prontera,0,0,0 script func_test 444,{ function my_func; my_func(); next; my_global_func(); next; callfunc("my_other_global_func"); end; function my_func { mes "this message from 'my_func' function from inside the npc"; return; } } function script my_other_global_func { mes "this message from 'my_other_global_func' function from out the npc"; return; }
  9. just to make it clear , seems like people miss-understood the command idea , this is not for normal players use , it will effect the performance of your server if every player in your server uses it! this is only for admin use!
  10. the script will be read as text no matter what is the extension ,just in the script config put .c instead of .txt if you have tested it before you post the question , i think you could have saved too much time!
  11. set .item_id, 12903; // next item id to shower to set .item_id1, 12903; // next item id to shower and .@var = rand(2); makeitem .@var?.item_id:.item_id2,1,.@map$,.@x_diff,.@y_diff; // <<< im stuck on this to makeitem getd(".item_id" + rand(1,8)),1,.@map$,.@x_diff,.@y_diff; // <<< im stuck on this And this is a better way to do your script - script Sample -1,{ OnInit: set .amount, 10; // amount of item to shower setarray .ItemID,12903,12904,12905,12906,12907,12908,13576,13584; .Size = getarraysize(.ItemID); bindatcmd "itemshower",strnpcinfo(3)+"::OnShower"; end; OnShower: getmapxy(.@map$, .@x, .@y, BL_PC); while ( .count < .amount ) { do { .@x_diff = .@x + rand(1,5); .@y_diff = .@y + rand(1,5); } while (!checkcell(.@map$,.@x_diff,.@y_diff,cell_chkpass)); makeitem .ItemID[rand(.Size)],1,.@map$,.@x_diff,.@y_diff; // <<< im stuck on this set .count, .count + 1; } set .count, 0; end; } btw "bindatcmd "itemshower",strnpcinfo(3)+"::OnShower";" means any player can use the command
  12. or you can do something like if(getd("$QID_" + get_unique_id())){ //already got }else{ //get something setd("$QID_" + get_unique_id(),true); }
  13. - script on_mvp_kill_item -1,{ OnNPCKillEvent: getunitdata(killedgid,.@info); if((.@info[UMOB_MODE]&MD_MVP)){ //item id 501 , count 1 , drop item under the mvp location on death makeitem(501,1,mapid2name(.@info[UMOB_MAPID]),.@info[UMOB_X],.@info[UMOB_Y]); } end; }
  14. use mes for English and mes_ar for Arabic for sentences with both languages try and see the result and use whatever this is not a perfect solution , it's just a work around the problem for now
  15. at the end of your rathena/npc/other/Global_Functions.txt add function script mes_ar { .@g$ = getarg(0); explode(.@m$, .@g$, " "); .@s = getarraysize(.@m$) -1; for(.@i=.@s;.@i>=0;.@i--){ .@r$ += .@m$[.@i] + " "; } mes .@r$; return; } How to use: prontera,0,0,0 script xxxxxx 444,{ mes_ar "روح شوف كونوسوبا"; end; }
  16. try this client info <servicetype>korea</servicetype> server config conf/import/char_conf.txt login_ip: 127.0.0.1 char_ip: public_ip conf/import/map_conf.txt char_ip: 127.0.0.1 map_ip: public_ip
  17. i suggest to optimize your script , it does lack optimization and customization. i think you can write the same thing in less then 150 line with more customization options too. also the name well , not really a good name for the script.
  18. Count my vote on yes , I Voted no xD.
  19. you are using the function name the same as the command name are you sure about the command name ? don't use the command name as a function name line 10 function script costume { line 65 costume .@part,1; // Convert the Headgear
  20. so basically you know now that the issue is coming from the files that you didn't remove.
  21. extra steps is will do nothing right? xD it's all about the gat file use the .gat that you are already using in your data folder , or first grf put the gat file in your import mapcache , and everything will work if you changed the gat file in your grf too , you maybe added a wrong gat file to the map, so don't edit the gat file(replace it) as long as you don't know what you are doing
  22. If that is the case, then it's from your client files ,just test ,remove any unneeded file from the client files (grf) it's better to start from a clean grf then add your necessary edits only (after you test with the clean grf and confirm that the problem is gone)
  23. setarray .@p, EQI_SHADOW_ARMOR, EQI_SHADOW_WEAPON; for(.@i=0;.@i<getarraysize(.@p);.@i++){ if(getequipisequiped(.@p[.@i])) .@menu$ += F_getpositionname(.@p[.@i]) + "[ " + getequipname(.@p[.@i]) + " ]"; .@menu$ += ":"; } .@part = .@p[select(.@menu$) -1];
×
×
  • Create New...