Jump to content

Sehrentos

Members
  • Posts

    91
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Sehrentos

  1. Ops, there was a typo in the sample. Here is fixed version: @size = getarraysize(getd(".tier_reward_"+@range)); copyarray @reward[0], getd(".tier_reward_"+@range+"[0]"), @size; And i think the setarray should be like this: setarray .tier_reward_0[0],7227,30804,30805,30806,30000,30001; setarray .tier_reward_1[0],7227,7227,7227,7227,7227,7227; setarray .tier_reward_2[0],30804,30804,30804,30804,30804,30804; setarray .tier_reward_4[0],30805,30805,30805,30805,30805,30805; 2. How come it does not give all the rewards? Script only reward one random party member. Reward is also random from the .tier_reward_0-3 Or did you mean to give all rewards from the .tier_reward_X array and not just one? If so, im sorry i got the wrong idea. I'm currently unable to test it, because i don't have a running emulator.
  2. Hi! Suggestion 1. This needs a fallback. If you cancel this prompt, then .@name does not exist. Suggestion 2. For the random tier set you can try this OnInit: // tier rewards setarray .tier_reward_0,7227,30804,30805,30806,30000,30001; setarray .tier_reward_1,7227,7227,7227,7227,7227,7227; setarray .tier_reward_2,30804,30804,30804,30804,30804,30804; setarray .tier_reward_3,30805,30805,30805,30805,30805,30805; OnBoxKill: deletearray @reward; @label$ = .npc_name$+"::OnBoxKill"; //@size = getd( ".tier_reward_"+.tier+"_size" ); //copyarray @reward[0],getd( ".tier_reward_"+.tier+"[0]" ),@size; // Select random tier set range 0-3 @range = rand(4); @size = getarraysize(getd(".tier_reward_"+@range)); copyarray @reward[0], getd(".tier_reward_"+@range+"[0]"), @size; doevent "WorldBoss::OnTalk"; end; Suggestion 3. For the party leader name. With this you can add .@leader_name$ in the announce string. .@party_id = getcharid(1); .@party_name$ = getpartyname(.@party_id); .@leader_id = getpartyleader(.@party_id, 2); .@leader_name$ = strcharinfo(0, .@leader_id); announce "[World Boss] The "+.@party_name$+" Hunting Party killed the World Boss! Congratulations!", bc_all, 0xFF0000; I hope these help
  3. I don't think there is a way to continue npc timer after a reload. Maby OnClock event or other workaround ? - script DayNight -1,{ OnClock0600: day; end; OnInit: // setting correct mode upon server start-up if (gettime(DT_HOUR)>=6 && gettime(DT_HOUR)<18) end; OnClock1800: night; end; }
  4. I'm not quite sure what you mean, like this perhaps? job_sword1,117,238,1 script electricity 1002,1,1,{ OnTouch: // Player has entered NPC's area warp "prontera",155,187; end; OnInit: npcspeed 60; npcwalkto 130,250; end; } You can increase the NPC's area of effect: 1002,2,2,{ But i'm not sure if OnTouch event will work on moving NPC's.
  5. Hey, Remove the first if check and it should work. It will change the title$ to YOO2 if player has the item and to YOO if not. Or like this in both cases: if (countitem(19009)) { set title$, "YOO2"; } else { set title$, "YOO"; }
  6. Hey, Remove else from the if statement so it will check both, cart and inventory.
  7. I'm not sure if this works, but you could test it by making an NPC that sets a bonus2 bDropAddRace,RC_All,5; for the current chacter. bonus_script "<script code>",<duration>{,<flag>{,<type>{,<status_icon>{,<char_id>}}}};
  8. Here is some help, Create an event NPC where you manage your normal monsters (sample below). Attach OnMobDead event on every minion and after minions have been killed activate boss event NPC. prt_are01,0,0,-1 script SummonMinions#1_1 -1,{ end; OnInit: // disable NPC on normal map disablenpc strnpcinfo(0); end; OnDisable: // Disable this NPC disablenpc instance_npcname(strnpcinfo(0)); end; OnEnable: enablenpc instance_npcname(strnpcinfo(0)); .@map$ = instance_mapname("prt_are01"); .@label$ = instance_npcname(strnpcinfo(0))+"::OnMobDead"; // Monsters areamonster .@map$,131,168,144,155,"Marin",1242,5,.@label$; //top-left areamonster .@map$,155,167,168,155,"Metaling",1613,5,.@label$; //top-right areamonster .@map$,144,155,144,131,"Poporing",1031,5,.@label$; //bottom-left areamonster .@map$,155,144,168,131,"Drops",1113,5,.@label$; //bottom-right end; OnMobDead: if (mobcount(instance_mapname("prt_are01"), instance_npcname(strnpcinfo(0))+"::OnMobDead") < 1) { mapannounce instance_mapname("prt_are01"),"Boss incomming!",bc_map,"0xFD3B02"; donpcevent instance_npcname("SummonBoss#1_1")+"::OnEnable"; disablenpc instance_npcname(strnpcinfo(0)); //Disable this NPC. } end; } Create an event NPC for the boss monster (Sample below). prt_are01,150,150,-1 script SummonBoss#1_1 -1,{ end; OnInit: // Disable NPC on normal map disablenpc strnpcinfo(0); end; OnEnable: enablenpc instance_npcname(strnpcinfo(0)); .@map$ = instance_mapname("prt_are01"); .@label$ = instance_npcname(strnpcinfo(0))+"::OnBossDead"; // Monsters monster .@map$,150,150,"The Boss",1090,1,.@label$; end; OnDisable: // Disable this NPC disablenpc instance_npcname(strnpcinfo(0)); end; OnBossDead: //specialeffect2 EF_MVP; //This effect will be triggered on the player who dealt the killing blow. mapannounce instance_mapname("prt_are01"),"Boss is dead!",bc_map,"0xFD3B02"; killmonster instance_mapname("prt_are01"),instance_npcname(strnpcinfo(0))+"::OnBossDead"; //Clean up // Enable portal npc at the center of the room. donpcevent instance_npcname("#PortalOut")+"::OnEnable"; // Disable this NPC //donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable"; disablenpc instance_npcname(strnpcinfo(0)); end; } After boss dies you activate portal event NPC (Sample below). prt_are01,150,150,0 script #PortalOut WARPNPC,2,2,{ end; OnInit: // Disable NPC on normal map disablenpc strnpcinfo(0); end; OnInstanceInit: // Disable NPC on instance init disablenpc instance_npcname(strnpcinfo(0)); end; OnEnable: mapannounce instance_mapname("prt_are01"),"[Portal] The portal to out side will be opening at the center of the room.",bc_map,"0x7799ff"; initnpctimer; // Activate portal after 10 seconds end; OnDisable: stopnpctimer; disablenpc instance_npcname(strnpcinfo(0)); end; OnTimer10000: mapannounce instance_mapname("prt_are01"),"[Portal] The portal to out side is now open.",bc_map,"0x7799ff"; enablenpc instance_npcname(strnpcinfo(0)); stopnpctimer; end; OnTouch: warp "prontera", 156, 167; end; } Repeat this process for each level you wish to create. Good luck!
  9. Docs says that name must be existing character but give it a try: getnameditem(<item id>,"<name to inscribe>"|<char id>); And for the npc name use: strnpcinfo(1) ;
  10. Hey, have you added your custom instance to the db/(pre-)re/instance_db.txt ?
  11. Hey, you don't need to attachrid twice it is already done in the IF statement. Same here and i think it go like this? for(.@i = 1; .@i < .@num; .@i++) { if (attachrid(.@teamA1[.@i])) { // Your stuff here Note to attachrid: "The command returns 0 if the player cannot be attached (if the account is offline or does not exist), and 1 upon success." It's a good practice to do checks to avoid possible errors and help to find them. // Check party create was successful if (party_create(<party name>)) { // Success } // Check party delete member was successful if (party_delmember()) { // Success } // Check party add member was successful if (party_addmember(<party id>,<character id>)) { // Success }
  12. Hi, add the above check i posted before to every "attachrid" command
  13. No, that is the part where it tries to attach the member into your script. It can fail if you dont check if attach was successful.
  14. Hey, Have you tried to add in some checks like if player is offline before accessing hes RID status? if (attachrid(.@teamA2[0])) { // Success }
  15. Hey, Have you tried to add in some checks like, if some member is offline? I think when getting RID when some one is offline will fail. Not 100% sure about this! xD Like this: // (Optional) Check who is the killer if (killedrid == killerrid) { // You have been killed by your own hand end; } // Check player is in a party if (getcharid(1)) { getpartymember(getcharid(1), 2); set .@partymembercount, $@partymembercount; copyarray .@partymemberaid[0], $@partymemberaid[0], .@partymembercount; for (set .@i, 0; .@i < .@partymembercount; set .@i, .@i + 1) { // Try to attach each party member to this script if (attachrid(.@partymemberaid[.@i])) { // Now we can check player status like AFK if (checkvending() && checkchatting()) { // This member is AFK end; } } } }
  16. Hey, Edit db/job_db2.txt for permanent stat bonuses per level. - Ups thats per job level my bad. At db/re/statpoint.txt is list of stat points given per level.
  17. Well i made a fresh install from git last night and i saw the same thing on my console. Edit: But its just info nothing dial to worry about Yeap, thanks @Playtester for the info
  18. Um.. it should be in conf/battle/feature.conf // Auction (Note 1) // Feature became unstable on clients 2012 onwards (exact date not known), // it has been fixed on clients 2013-05-15 onwards however. feature.auction: on
  19. So i'm guessing this could also work as desktop application with TideSDK or appjs-deskshell ? Because it's mainly html5, js and WebGL
  20. I have same problems. setunitdata <GID>,<parameter>,<new value>; Max-Health & Health -Something buggy here... some times works, some times not Mode -fail Speed - fail Str ,Int, Dex and the rest stats -fail My test script: http://pastebin.com/jH9p22yy Any ideas?
  21. Looks interesting, good idea. Don't have any new suggestions on it yet
  22. Thanks @Cydh, i will be merging these changes too
  23. Oo the time before auctioneer came +1 Very nice script. Good if you need to use custom payment methods for selling stuff. But with Zeny involved, i see it as an normal auction just like said. mes "Close this window to open the Auction window."; close2; openauction; end; And give commands to players? @auction to open it.
  24. I think costumes are more like normal hats, just in different location. So you need to edit iteminfo.lub to make them work for clients ? https://rathena.org/wiki/Custom_Items
×
×
  • Create New...