Jump to content

sader1992

Content Moderator
  • Posts

    1678
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by sader1992

  1. ingame type /roulette this will hide it , and if it's disabled in the server no one can use it.
  2. prontera,0,0,0 script quest 444,{ mes "do you want to exchange the items:"; for(.@i=0;.@i<getarraysize(.requirements);.@i+=2){ mes "(" + .requirements[.@i +1] + ") " + getitemname(.requirements[.@i]); } mes "for a random reward ?"; if(select("yes:no") == 2) end; for(.@i=0;.@i<getarraysize(.requirements);.@i+=2){ if(countitem(.requirements[.@i]) < .requirements[.@i+1]){ mes "you dont have (" + .requirements[.@i +1] + ") " + getitemname(.requirements[.@i]); end; } } for(.@i=0;.@i<getarraysize(.requirements);.@i+=2){ delitem .requirements[.@i],.requirements[.@i +1]; } getitem .rewards[rand(getarraysize(.rewards))],1; announce "player: " + strcharinfo(0) + "Did the quest!!!!",bc_all; end; OnInit: setarray .rewards,7073,7074,7075,7076,7077,7078,7079,7080,7081,7082; setarray .requirements,7020,10,1054,50,7035,15,1009,50,7442,50; end; }
  3. something like this ? // OnClock<hour><minute>: donpcevent "<npc_name>::OnStart"; OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1600: OnClock2000: switch(rand(1,6)){ case 1: donpcevent "Event_1::OnStart"; end; case 2: donpcevent "Event_2::OnStart"; end; case 3: donpcevent "Event_3::OnStart"; end; case 4: donpcevent "Event_4::OnStart"; end; case 5: donpcevent "Event_5::OnStart"; end; case 6: donpcevent "Event_6::OnStart"; end; } or // OnClock<hour><minute>: donpcevent "<npc_name>::OnStart"; OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1600: OnClock2000: donpcevent "Event_" + rand(1,6) + "::OnStart"; end;
  4. search for ordeal_2-1 replace with ordeal_3-2 use notepad++
  5. I didn't understand The player's class is his job id
  6. what do you mean by job id ? you want the job id of the player who is killed ? you can do readparam() OnPCKillEvent: debugmes "" + readparam(Class,convertpcinfo(killedrid,CPC_CHAR)); end; readparam(Class,convertpcinfo(killedrid,CPC_CHAR)) will return the class of the killed if it's a player ofc , hint OnPCKillEvent
  7. freeloop(1); for(.@i=10;.@i<=19;.@i++){ LevelUpReward(1,.@i,0,0,11501,20,11502,10,12211,1); }
  8. the script gives a reward only for the level you type , if you don't have a line with the level and the job , it wont add a reward to it if you want to add the reward for every level in the class after level 10 , you can do this freeloop(1); for(.@i=10;.@i<MAX_LEVEL;.@i++){ LevelUpReward(1,.@i,0,0,11501,20,11502,10,12211,1); }
  9. what do you mean by skip ? the script work when you level up with a normal why , you have level up by killing monsters or quests also if you have +80% Weight , the reward would be in @LevelUpReward
  10. 30017 Glasses_Slot_Ticket thin is my ctrl+v I as sending list of some items I created for a server to the owner ?
  11. View File F_Randomizer randomize and split array into arrays this function can be used to randomize and split thr first array passed in to it to the other arrays Warning! the main array size must be divided by the count of the other arrays for example , you have .@main size 4, you should not send 3 arrays cuz 4/3 = 1 and 1 left , it will fail! the example npc from the photo is included in the file also here it is - script Randomizer_test -1,{ OnInit: debugmes "================================================"; setarray .@main,1,2,3,4,5,6,7,8,9,10,11,12; for(.@i=0;.@i<getarraysize(.@main);.@i++){ debugmes "" + .@main[.@i]; } debugmes "================================================"; debugmes "Split and randomize the elements of .@main into .@a .@b .@c .@d .@e .@f .@g arrays"; debugmes "================================================"; F_Randomizer(.@main,.@a,.@b,.@c,.@e,.@f,.@g); for(.@i=0;.@i<getarraysize(.@a);.@i++){ debugmes ".@a " + .@a[.@i]; } for(.@i=0;.@i<getarraysize(.@b);.@i++){ debugmes ".@b " + .@b[.@i]; } for(.@i=0;.@i<getarraysize(.@c);.@i++){ debugmes ".@c " + .@c[.@i]; } for(.@i=0;.@i<getarraysize(.@e);.@i++){ debugmes ".@e " + .@e[.@i]; } for(.@i=0;.@i<getarraysize(.@f);.@i++){ debugmes ".@f " + .@f[.@i]; } for(.@i=0;.@i<getarraysize(.@g);.@i++){ debugmes ".@g " + .@g[.@i]; } debugmes "=================================================================================="; end; } the best place to put the function in is at the end of rathena/npc/other/Global_Functions.txt file Submitter sader1992 Submitted 08/20/2020 Category Utilities Video Content Author sader1992  
  12. Version 1.0.0

    54 downloads

    this function can be used to randomize and split thr first array passed in to it to the other arrays Warning! the main array size must be divided by the count of the other arrays for example , you have .@main size 4, you should not send 3 arrays cuz 4/3 = 1 and 1 left , it will fail! the example npc from the photo is included in the file also here it is - script Randomizer_test -1,{ OnInit: debugmes "================================================"; setarray .@main,1,2,3,4,5,6,7,8,9,10,11,12; for(.@i=0;.@i<getarraysize(.@main);.@i++){ debugmes "" + .@main[.@i]; } debugmes "================================================"; debugmes "Split and randomize the elements of .@main into .@a .@b .@c .@d .@e .@f .@g arrays"; debugmes "================================================"; F_Randomizer(.@main,.@a,.@b,.@c,.@e,.@f,.@g); for(.@i=0;.@i<getarraysize(.@a);.@i++){ debugmes ".@a " + .@a[.@i]; } for(.@i=0;.@i<getarraysize(.@b);.@i++){ debugmes ".@b " + .@b[.@i]; } for(.@i=0;.@i<getarraysize(.@c);.@i++){ debugmes ".@c " + .@c[.@i]; } for(.@i=0;.@i<getarraysize(.@e);.@i++){ debugmes ".@e " + .@e[.@i]; } for(.@i=0;.@i<getarraysize(.@f);.@i++){ debugmes ".@f " + .@f[.@i]; } for(.@i=0;.@i<getarraysize(.@g);.@i++){ debugmes ".@g " + .@g[.@i]; } debugmes "=================================================================================="; end; } the best place to put the function in is at the end of rathena/npc/other/Global_Functions.txt file
    Free
  13. Attendance: != Body: also you should have screenshoted the console error
  14. you need to change the encoding than write in Arabic.
  15. setarray .@AIDS,2000001,2000034,2000075,2000002,2000007; if(!#give70 && inarray(.@AIDS,getcharid(3)) != -1){ getitem <id>,<count>; #give70 = true; }
  16. https://github.com/rathena/rathena/blob/9000948c3c524c98f472da716164ac3d5954706f/doc/script_commands.txt#L278 EXAMPLE: prontera,0,0,0 itemshop my item shop 444,503,504:50,505:100;
  17. prontera,154,180,0 script rental item 444,{ if(#CASHPOINTS){ rentitem <item id>,<time>;//time in seconds, 1 day = 86400 #CASHPOINTS -= 1; } end; OnInit: waitingroom "[ Click Me! ]",0; end; }
  18. once? per char? per account?
  19. this wont excite anyway try to use OnInstanceInit: , also with what mentioned above about the map name, also for the npc name *instance_npcname("<npc name>"{,<instance id>}) job_thief1,1,1,0 script #testmobs HIDDEN_WARP_NPC,{ //mes "Hi there"; close; OnInstanceInit: .@m$ = instance_mapname("job_thief1"); .@n$ = instance_npcname("#testmobs"); monster .@m$,0,0,"Apocalypse",30001,34,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Civil Servant",30002,37,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Undoer",30003,33,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Leaf Cat",30004,35,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Enchanter",30005,32,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Garm",30006,5,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Raydric DeadEye",30007,35,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Monkey Fist",30008,22,.@n$ + "::OnMobsKilled"; OnMobsKilled: //announce "Hey, " + strcharinfo(0) + " just killed a Poringz0rd!",bc_blue|bc_all; end; }
  20. on clean https://github.com/rathena/rathena/compare/master...sader1992:autoloot_no_mvp_no_card you should remove what I sent before https://github.com/sader1992/rathena/commit/57018fda8f80db4b9a5e8faa20924ad96c75fb5b (this include the undo of the before)
  21. so the mvp does not drop items on the ground and does not get the item in the inventory ?
  22. try this https://github.com/sader1992/rathena/commit/3b68dd43155da98a98a0b6ea4c0844964dbf0224 no autoloot on cards and mvp monsters
×
×
  • Create New...