Jump to content

sader1992

Content Moderator
  • Content Count

    1,574
  • Avg. Content Per Day

    1
  • Joined

  • Last visited

  • Days Won

    59

sader1992 last won the day on July 23

sader1992 had the most liked content!

Community Reputation

597 Excellent

About sader1992

  • Rank
    Megumin
  • Birthday 11/16/1991

Profile Information

  • Gender
    Male
  • Location
    Syria
  • Server
    DEV On : ArenaRO , DigitalRO
  • Github: sader1992
  • Discord: sader1992#3562
  • Interests
    rAthena , C# , C++ , PHP , MMO , Anime , Microsoft , Science , Cooking , Math

Contact Methods

Recent Profile Visitors

12,672 profile views
  1. do not select that patch when you create your client
  2. //for map //cutin2(<"map">,"<filename>",<position>); function cutin2 { freeloop(true); [email protected]$ = getarg(0); [email protected]$ = getarg(1); [email protected] = getarg(2); [email protected] = getmapunits(BL_PC,[email protected]$,[email protected]); for([email protected]=0;[email protected]<[email protected];[email protected]++){ if(([email protected] = convertpcinfo([email protected][[email protected]],CPC_CHAR))) cutin([email protected]$,[email protected],[email protected]); } return; } //whole server //cutin3("<filename>",<position>); function cutin3 { freeloop(true); [email protected]$ = getarg(0); [email protected] = getarg(1); [email protected] = getunits(BL_PC,[email protected]); for([email protected]=0;[email protected]<[email protected];[email protected]++){ if(([email protected] = convertpcinfo([email protected][[email protected]],CPC_CHAR))) cutin([email protected]$,[email protected],[email protected]); } return; }
  3. to save time and replies here is a step-by-step rathena/src/map/script.cpp search for BUILDIN_FUNC(cutin) { TBL_PC* sd; if( !script_rid2sd(sd) ) return SCRIPT_CMD_SUCCESS; clif_cutin(sd,script_getstr(st,2),script_getnum(st,3)); return SCRIPT_CMD_SUCCESS; } replace if( !script_rid2sd(sd) ) with if (!script_charid2sd(4, sd)) search and replace this BUILDIN_DEF(cutin,"si"), with BUILDIN_DEF(cutin,"si?"), DON'T FORGET TO RECOMPILE YOUR SERVER! and this is an example on how i would have done it prontera,0,0,0 script gdfjfhadh 444,{ function cutin2; announce("test 1",BC_ALL); cutin2("prontera","pc.bmp",2); sleep 3000; announce("test 2",BC_ALL); cutin2("prontera","",255); sleep 3000; announce("test 3",BC_ALL); cutin2("prontera","pc.bmp",2); sleep 3000; announce("test 4",BC_ALL); cutin2("prontera","",255); end; function cutin2 { freeloop(true); [email protected]$ = getarg(0); [email protected]$ = getarg(1); [email protected] = getarg(2); [email protected] = getmapunits(BL_PC,[email protected]$,[email protected]); for([email protected]=0;[email protected]<[email protected];[email protected]++){ cutin([email protected]$,[email protected],convertpcinfo([email protected][[email protected]],CPC_CHAR)); } return; } }
  4. 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
  5. checkout the command detachrid
  6. cutin needs a player to be attached in the script first, OnTimer event does not attach any plyer checkout addrid command
  7. 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!
  8. 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>)))
  9. close4 function not found, the error message is clear.
  10. search for the item id.
  11. Unknown Item with Apple icon = Iteminfo.lub/lua
  12. 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; }
  13. 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!
  14. 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!
  15. sader1992

    item shower

    set .item_id, 12903; // next item id to shower to set .item_id1, 12903; // next item id to shower and [email protected] = rand(2); makeitem [email protected]?.item_id:.item_id2,1,[email protected]$,[email protected]_diff,[email protected]_diff; // <<< im stuck on this to makeitem getd(".item_id" + rand(1,8)),1,[email protected]$,[email protected]_diff,[email protected]_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([email protected]$, [email protected], [email protected], BL_PC); while ( .count < .amount ) { do { [email protected]_diff = [email protected] + rand(1,5); [email protected]_diff = [email protected] + rand(1,5); } while (!checkcell([email protected]$,[email protected]_diff,[email protected]_diff,cell_chkpass)); makeitem .ItemID[rand(.Size)],1,[email protected]$,[email protected]_diff,[email protected]_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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.