Jump to content

Racaae

Members
  • Posts

    222
  • Joined

  • Last visited

  • Days Won

    32

Racaae last won the day on April 19

Racaae had the most liked content!

5 Followers

Profile Information

  • Gender
    Male
  • Location
    Brasil

Recent Profile Visitors

3314 profile views

Racaae's Achievements

Magmaring

Magmaring (7/15)

  • Reacting Well
  • Problem Solver Rare
  • Dedicated
  • First Post
  • Collaborator

Recent Badges

95

Reputation

47

Community Answers

  1. Hey. I can't reproduce this error, it's working fine here. If you made any changes to the script, could you share it? What is the message displayed in the map-server console?
  2. Hi. Find this line in \src\map\skill.cpp and cut it (around line 8197): case AL_INCAGI: Then find the following line in \src\map\skill.cpp and paste that line (around line 9233): case CASH_ASSUMPTIO: > case CASH_ASSUMPTIO: case AL_INCAGI: Add the following in \db\import\skill_db.yml: Body: - Id: 29 Description: Increase AGI TargetType: Self DamageFlags: Splash: true SplashArea: -1 Save the files and recompile your server.
  3. prt_ext,165,138,5 script PvP Arena 574,{ if(agitcheck()) goto nowoetime; mes "[PvP Battle Room]"; mes "Let's Go!!!!!"; menu "No limit [" + getmapusers("guild_vs3") + "]",pvp1, "Non Donate [" + getmapusers("guild_vs4") + "]",spvp, "Guild vs Guild [" + getmapusers("guild_vs2") + "]",gvg1, "Sinx [" + getmapusers("guild_vs1") + "]",sinx; nowoetime: mes "[PvP Battle Room]"; mes "You cannot enter to PvP Room during WoE!"; close; pvp1: warp "guild_vs3",0,0; announce ""+ strcharinfo(0) +" Has Entered The PVP Room.",bc_all; close; gvg1: warp "guild_vs2",0,0; announce ""+ strcharinfo(0) +" Has Entered The GVG Room.",bc_all; close; spvp: if(countitem(59138) > 0 || countitem(59139) > 0 || countitem(59140) > 0 || countitem(59141) > 0 || countitem(59142) > 0 || countitem(59143) > 0 || countitem(59144) > 0 || countitem(59145) > 0 || countitem(59146) > 0 || countitem(59147) > 0 || countitem(59148) > 0 || countitem(59149) > 0 || countitem(59155) > 0 || countitem(59150) > 0 || countitem(59151) > 0 || countitem(59152) > 0 || countitem(59153) > 0 || countitem(59154) > 0 //donate weapon || countitem(59000) > 0 || countitem(59001) > 0 || countitem(59002) > 0 || countitem(59003) > 0 || countitem(59004) > 0 || countitem(59005) > 0 || countitem(59006) > 0 || countitem(59007) > 0 || countitem(59008) > 0 || countitem(59009) > 0 || countitem(59010) > 0 || countitem(59011) > 0 || countitem(59012) > 0 || countitem(59013) > 0 || countitem(59014) > 0 //Pointers || countitem(501) > 0) goto donator; warp "guild_vs4",0,0; announce ""+ strcharinfo(0) +" Has Entered The PVP Room Non Donate.",bc_all; close; donator: mes "You are a donator you are not allowed to this room"; close; sinx: //Put the Custom Items IDs here setarray .@sinx_CustomItems,59000,59001,59002,59003,59004,59005,59006,59007, 59008,59009,59010,59011,59012,59013,59014,59138,59139,59140, 59141,59142,59143,59144,59145,59146,59147,59148,59149,59150, 59151,59152,59153,59154,59155; clear; mes "[PvP Battle Room]"; mes "This room is for ^0000FFAssassin job only^000000."; if (BaseJob != Job_Assassin) close; switch(select("Enter", "Restricted items list", "Cancel")) { case 1: break; case 2: clear; mes "[PvP Battle Room]"; mes "You can't use the following inside:"; for(.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++) mes "" + getitemname(.@sinx_CustomItems[.@i]); close; case 3: close; } for (.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++) { if (countitem(.@sinx_CustomItems[.@i])) .@has_forbidden[.@count++] =.@sinx_CustomItems[.@i]; } if (.@has_forbidden[0]) { clear; mes "[PvP Battle Room]"; mes "You can't enter the room with the following items in your inventory:"; for(.@i = 0; .@i < getarraysize(.@has_forbidden); .@i++) mes "" + getitemname(.@has_forbidden[.@i]); close; } announce strcharinfo(0) +" has entered the PVP Room Sinx.",bc_all; warp "guild_vs1",0,0; end; //OnPCDieEvent: // set @Die,@Die + 1; // if( @Die % 2 == 0 ) warp "SavePoint",0,0; // end; }
  4. That's your request, right? "only custom item will allowed to use inside the sinx pvp room". Is it allow custom items and block everything else or block custom items and allow everything else?
  5. Your rAthena is outdated. You can update it or use this version below: prt_ext,165,138,5 script PvP Arena 574,{ if(agitcheck()) goto nowoetime; mes "[PvP Battle Room]"; mes "Let's Go!!!!!"; menu "No limit [" + getmapusers("guild_vs3") + "]",pvp1, "Non Donate [" + getmapusers("guild_vs4") + "]",spvp, "Guild vs Guild [" + getmapusers("guild_vs2") + "]",gvg1, "Sinx [" + getmapusers("guild_vs1") + "]",sinx; nowoetime: mes "[PvP Battle Room]"; mes "You cannot enter to PvP Room during WoE!"; close; pvp1: warp "guild_vs3",0,0; announce ""+ strcharinfo(0) +" Has Entered The PVP Room.",bc_all; close; gvg1: warp "guild_vs2",0,0; announce ""+ strcharinfo(0) +" Has Entered The GVG Room.",bc_all; close; spvp: if(countitem(59138) > 0 || countitem(59139) > 0 || countitem(59140) > 0 || countitem(59141) > 0 || countitem(59142) > 0 || countitem(59143) > 0 || countitem(59144) > 0 || countitem(59145) > 0 || countitem(59146) > 0 || countitem(59147) > 0 || countitem(59148) > 0 || countitem(59149) > 0 || countitem(59155) > 0 || countitem(59150) > 0 || countitem(59151) > 0 || countitem(59152) > 0 || countitem(59153) > 0 || countitem(59154) > 0 //donate weapon || countitem(59000) > 0 || countitem(59001) > 0 || countitem(59002) > 0 || countitem(59003) > 0 || countitem(59004) > 0 || countitem(59005) > 0 || countitem(59006) > 0 || countitem(59007) > 0 || countitem(59008) > 0 || countitem(59009) > 0 || countitem(59010) > 0 || countitem(59011) > 0 || countitem(59012) > 0 || countitem(59013) > 0 || countitem(59014) > 0 //Pointers || countitem(501) > 0) goto donator; warp "guild_vs4",0,0; announce ""+ strcharinfo(0) +" Has Entered The PVP Room Non Donate.",bc_all; close; donator: mes "You are a donator you are not allowed to this room"; close; sinx: //Put the Custom Items IDs here setarray .@sinx_CustomItems,2538,2435,2378,2721,13036,13411,1279,13037,13410,1280,2772,2773,2774,1281,1282; clear; mes "[PvP Battle Room]"; mes "This room is for ^0000FFAssassin job only^000000."; if (BaseJob != Job_Assassin) close; switch(select("Enter", "Allowed items list", "Cancel")) { case 1: break; case 2: clear; mes "[PvP Battle Room]"; mes "You can use only the following inside:"; for(.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++) mes "" + getitemname(.@sinx_CustomItems[.@i]); close; case 3: close; } getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) { .@item_id = @inventorylist_id[.@i]; if (getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_ARMOR && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_WEAPON && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_SHADOWGEAR) continue; if (inarray(.@sinx_CustomItems, .@item_id) > -1 || inarray(.@has_forbidden, .@item_id) > -1) continue; .@has_forbidden[.@count++] = .@item_id; } if (.@has_forbidden[0]) { clear; mes "[PvP Battle Room]"; mes "You have forbidden items in your inventory. Store or put them away before entering:"; for(.@i = 0; .@i < getarraysize(.@has_forbidden); .@i++) mes "" + getitemname(.@has_forbidden[.@i]); close; } announce strcharinfo(0) +" has entered the PVP Room Sinx.",bc_all; warp "guild_vs1",0,0; end; //OnPCDieEvent: // set @Die,@Die + 1; // if( @Die % 2 == 0 ) warp "SavePoint",0,0; // end; }
  6. Hello, getmonsterinfo will return "null" if you requested a invalid monster's name. getmonsterinfo(.@mvp_id, MOB_NAME) == "null" monster sets an array with the game ID of the spawned monster(s). Array is stored in $@mobid[]. .@mob_gid = $@mobid[0]; setunitdata monster parameters are UMOB_. setunitdata(.@mob_gid, UMOB_HP, 20000000); setunitdata(.@mob_gid, UMOB_MAXHP, 20000000); setunitdata(.@mob_gid, UMOB_ATKMIN, 10000); setunitdata(.@mob_gid, UMOB_ATKMAX, 15000); setunitdata(.@mob_gid, UMOB_DEF, 200); setunitdata(.@mob_gid, UMOB_MDEF, 200); setunitdata(.@mob_gid, UMOB_AGI, 150); setunitdata(.@mob_gid, UMOB_STR, 200); setunitdata(.@mob_gid, UMOB_VIT, 200); setunitdata(.@mob_gid, UMOB_INT, 150); setunitdata(.@mob_gid, UMOB_HIT, 600); setunitdata(.@mob_gid, UMOB_FLEE, 500); Parameters (indexes) for monsters Use sleep2 instead of sleep. sleep will not keep the rid (to display the mes text), while sleep2 does.
  7. Hello, the data is stored on sql database table skill. You can use script command getskilllist. /doc/script_commands.txt#L3662 *getskilllist({<char_id>}); This command sets a bunch of arrays with a complete list of skills the invoking character has. Here's what you get: @skilllist_id[] - skill ids. @skilllist_lv[] - skill levels. @skilllist_flag[] - see 'skill' for the meaning of skill flags. @skilllist_count - number of skills in the above arrays.
  8. Hi //===== rAthena Script ======================================= //= World Boss Apparition //===== By: ================================================== //= Alayne //===== Current Version: ===================================== //= 1.0 First version. //= 2.0 Updated. [Racaae] //============================================================ - script WorldBoss::alawboss -1,{ OnInit: //===== CONF .rewardMode = 2; // 1:inventory - 2:mailed - 3:drop on floor // Rewards // setarray .reward_id[0], <itemID>{,<itemID>,...} // setarray .reward_amount[0], <amount>{,<amount>,...} setarray .reward_id[0],969; setarray .reward_amount[0],1; .special_reward_id = 607; //item id for person who gave the final blow .special_reward_amount = 3; //amount for person who gave the final blow .reward_zeny = 0; // Zeny reward .rewardCount = -1; //How many items to drop on floor? (rewardMode:3 Only) .ip_check = true; //No rewards for double login set .bossAliveDuration, 30; //in minutes setarray .rebirthXY[0],120,202,202,120,119,37,37,119; //X, then Y. Only used if only one map is used set $lastPopMap$, ""; set $wordBossPop, 0; setarray .wbMap$[0], "prontera"; setarray .wbMapName$[0], "Prontera"; setarray .wBossIds[0], 2320,2483,1917,2942,2131; setarray .wBossHp[0], 20000000,30000000,40000000,50000000,60000000; //Storm Gust, Meteor Storm, Lord of Vermillion, Bowling Bash, Kyrie Eleison setarray .wbSummonSkillId[0], 89, 83, 85, 62, 73; setarray .wBossName$[0], "Hoktarrh","Giashim","Deathres","Cerbere","Citrak"; setarray .wbSlaveMobsId[0], 1098, 2023, 2365, 2019, 2472; setarray .wbSlaveMobsCount[0], 25, 15, 10, 15, 5; setarray .deadMonstersId[0], 1865, 2603, 1870, 2473, 2474, 2283; //===== CONF END set .timerCount, 0; .reward_id_size = getarraysize(.reward_id); bindatcmd "worldboss", strnpcinfo(3) + "::OnStartWBoss",90,90; end; OnStartWBoss: .@force = 1; OnMinute30: OnStarted: if($WorldBoss_cd <= gettimetick(2) || .@force) { set .@chosenMap$, "[ "; set .@spawnRand, rand(0, getarraysize(.wbMap$)-1); set .lastRandId, rand(0, getarraysize(.wBossIds) - 1); //RATHENA monster .wbMap$[.@spawnRand],82,55,.wBossName$[.lastRandId],.wBossIds[.lastRandId],1,strnpcinfo(3) + "::OnWorldBossDied",2; set .wBossId, $@mobId[0]; setunitdata .wBossId, UMOB_MAXHP, .wBossHp[.@spawnRand]; set .@chosenMap$, .@chosenMap$ + .wbMapName$[.@spawnRand] + "]"; announce "[ System ] World Boss appeared in " + .@chosenMap$ + " !",bc_all,0xFF0000; set $WorldBoss_cd, gettimetick(2) + 21600; //next pop in 3 days, 60 for debug (1 min) - 21600 6hours set $lastPopMap$, .wbMap$[.@spawnRand]; set $lastPopIdRank, .@spawnRand; deletearray $wbFighters[0], getarraysize($wbFighters); set $wordBossPop, 1; set .deadCount, 0; set .timerCount, 0; initnpctimer; donpcevent "World Boss#wb_board::OnEvent"; } else { if(.debug == 1) { debugmes "Not ready yet."; } } end; OnTimer1000: .timerCount += 1; freeloop(1); if(.timerCount == .bossAliveDuration * 60) { stopnpctimer; killmonster $lastPopMap$, strnpcinfo(3) + "::OnWorldBossDied"; killmonster $lastPopMap$, strnpcinfo(3) + "::OnSaveDied"; killmonster $lastPopMap$, strnpcinfo(3) + "::OnCloneDied"; killmonster $lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied"; set $wordBossPop, 0; announce "[ System ] World Boss vanished without being killed...",bc_all,0x00FF00; } set .@cellRange, 25; switch(.timerCount) { case 60: //1 min mapannounce $lastPopMap$, "[ World Boss ] Raise! Raise, my army!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1) { for(set .@j,0; .@j<.wbSlaveMobsCount[.@i]; set .@j,.@j+1) { areamonster $lastPopMap$, .@x - .@cellRange, .@y - .@cellRange, .@x + .@cellRange, .@y + .@cellRange, "Slaves", .wbSlaveMobsId[.@i], 1, strnpcinfo(3) + "::OnSaveDied"; } } break; case 120: //2 min, all summon cast skills mapannounce $lastPopMap$, "[ World Boss ] You are all far beyond my control!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1) { areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], .wbSummonSkillId[.lastRandId], 5, 3000,1,ET_KIK,3; } break; case 180: //3 min, pop 15 reduced clone of the mob mapannounce $lastPopMap$, "[ World Boss ] You won't go away with this, humans!", bc_map, 0xFF0000; monster $lastPopMap$,0,0,.wBossName$[.lastRandId],.wBossIds[.lastRandId],15,strnpcinfo(3) + "::OnReducedBossDied"; copyarray .@tempMobId[0], $@mobId[0], 15; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@hp, .@worldBossData[UMOB_HP]; set .@tempHp, .@hp / 15; for(set .@i,0; .@i<getarraysize(.@tempMobId); set .@i,.@i+1) { //RATHENA setunitdata .@tempMobId[.@i], UMOB_MAXHP, .@tempHp; setunitdata .@tempMobId[.@i], UMOB_HP, .@tempHp; } break; case 240: //4 min, raise dead bodies mapannounce $lastPopMap$, "[ World Boss ] Even the deads are on my side! You can't win!", bc_map, 0xFF0000; set .@deadSplit, .deadCount / getarraysize(.deadMonstersId); if(.@deadSplit <= 0) { set .@deadSplit, 2; } //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.deadMonstersId); set .@i,.@i+1) { areamonster $lastPopMap$, .@x - .@cellRange, .@y - .@cellRange, .@x + .@cellRange, .@y + .@cellRange, "Dead Corpses", .deadMonstersId[.@i], .@deadSplit, strnpcinfo(3) + "::OnSaveDied"; } break; case 300: //5 min, pop clone of each player mapannounce $lastPopMap$, "[ World Boss ] Fight against your own power you're so proud of, shall you?!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize($wbFighters); set .@i,.@i+1) { if(attachrid($wbFighters[.@i]) == 1 && strcharinfo(3) == $lastPopMap$) { clone $lastPopMap$, rand(.@x - .@cellRange, .@x + .@cellRange), rand(.@y - .@cellRange, .@y + .@cellRange), strnpcinfo(3) + "::OnCloneDied", getcharid(0); } else { deletearray $wbFighters[.@i], 1; } } break; case 360: //6 min mapannounce $lastPopMap$, "[ World Boss ] Raise! Raise, my army!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1) { for(set .@j,0; .@j<.wbSlaveMobsCount[.@i]; set .@j,.@j+1) { areamonster $lastPopMap$, .@x - .@cellRange * 2, .@y - .@cellRange * 2, .@x + .@cellRange * 2, .@y + .@cellRange * 2, "Slaves", .wbSlaveMobsId[.@i], 1, strnpcinfo(3) + "::OnSaveDied"; } } break; case 420: //7 min, autocast earthquake at 10% hp cost mapannounce $lastPopMap$, "[ World Boss ] STOP BOTHERING ME, HUMANS!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@hp, .@worldBossData[UMOB_HP]; set .@mhp, .@worldBossData[UMOB_MAXHP]; set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; if(.@hp > 10 * .@mhp / 100) { //RATHENA setunitdata .wBossId, UMOB_HP, .@hp - 10 * .@mhp / 100; set .@id, .wbSlaveMobsId[rand(getarraysize(.wbSlaveMobsId) - 1)]; areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .@id, 653, 3, 3000, 1, ET_KIK, 3; } else { //only world boss pop, but stronger areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wBossIds[$lastPopIdRank], 653, 10, 3000, 1, ET_KIK, 3; } break; case 480: //8 min, wide bleeding mapannounce $lastPopMap$, "[ World Boss ] You don't even deserve me to fight you!", bc_map, 0xFF0000; areamobuseskill $lastPopMap$, .@x, .@y, 50, .wBossIds[$lastPopIdRank], 665, 5, 3000, 1, ET_KIK, 3; break; case 540: //9 min, random kill over fighters mapannounce $lastPopMap$, "[ World Boss ] Feel my rage! Limitless is my power!!", bc_map, 0xFF0000; set .@killCount, rand(getarraysize($wbFighters)); for(set .@i,0; .@i<getarraysize($wbFighters); set .@i,.@i+1) { if(attachrid($wbFighters[.@i]) == 1 && strcharinfo(3) == $lastPopMap$) { charcommand "#nuke " + strcharinfo(0) + " " + strcharinfo(0); } else { deletearray $wbFighters[.@i], 1; } } break; case 600: //10 min, raise life according to alive clones mapannounce $lastPopMap$, "[ World Boss ] I'll feast from your bones!!", bc_map, 0xFF0000; set .@mobCount, mobcount($lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied"); killmonster $lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied"; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@hp, .@worldBossData[UMOB_HP]; set .@mhp, .@worldBossData[UMOB_MAXHP]; if( .@hp + .@mobCount * 50000 > .@mhp ) setunitdata .wBossId, UMOB_HP, .@mhp; else setunitdata .wBossId, UMOB_HP, .@hp + .@mobCount * 50000; break; case 660: //11 min, slave skill area mapannounce $lastPopMap$, "[ World Boss ] Life and death are nothing to me!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1) { //BASILICA 362 (5) OR EVILLAND 670 (1) if(rand(1) == 0) { areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], 362, 5, 3000,1,ET_KIK,3; } else { areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], 670, 1, 3000,1,ET_KIK,3; } } break; } setnpctimer 0; freeloop(0); end; OnPCDieEvent: if(strcharinfo(3) == $lastPopMap$ && getarraysize(.wbMap$) == 1) { set .@rebirthArea, rand(4); warp $lastPopMap$, .rebirthXY[.@rebirthArea * 2], .rebirthXY[.@rebirthArea * 2 + 1]; charcommand "#alive " + strcharinfo(0); } addtimer 10000, strnpcinfo(3) + "::OnPopClone"; set .deadCount, .deadCount + 1; end; OnPopClone: if(Hp > 0) { set .@cellRange, 25; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; clone $lastPopMap$, rand(.@x - .@cellRange, .@x + .@cellRange), rand(.@y - .@cellRange, .@y + .@cellRange), strnpcinfo(3) + "::OnCloneDied", getcharid(0); } end; OnSaveDied: OnCloneDied: OnReducedBossDied: //nothing, used to clean end; OnWorldBossDied: stopnpctimer; set $wordBossPop, 0; donpcevent "World Boss#wb_board::OnEvent"; killmonster $lastPopMap$, "All"; announce "[ System ] "+strcharinfo(0)+" gave the final blow to the World Boss !",bc_all,0x0000FF; if (.special_reward_id && .special_reward_amount) getitem .special_reward_id, .special_reward_amount; callsub OnReward; end; OnReward: if (!.reward_id_size && !.reward_zeny) return; if (.rewardMode == 3) { if (.rewardCount == -1) { set .rewardCount, getmapusers($lastPopMap$); } for (set .@i,0; .@i < .rewardCount; set .@i,.@i+1) { set .@rand, rand(getarraysize(.@reward_id)); //edit 150 if the map length and height is different of 150 cell makeitem .reward_id[.@rand],.reward_amount[.@rand],$lastPopMap$,rand(150),rand(150); } return; } if (.rewardMode) .@str$ = gettimestr("%B %d, %Y",21); freeloop(1); .@size = getmapunits(BL_PC,$lastPopMap$,.@aid[0]); if (.ip_check) { for ( .@j = 0; .@j < .@size; ++.@j ) { // .@ip$ = replacestr(getcharip(.@aid[.@j]),".",""); .@ip$ = getcharip(.@aid[.@j]); .@duplicate = inarray(.@iplist$, .@ip$); if (.@duplicate < 0) .@iplist$[.@iplistcount++] = .@ip$; else { message rid2name(.@aid[.@j]), "Another character with the same IP address has received the World Boss reward."; deletearray .@aid[.@j],1; .@j--; } } .@size = getarraysize(.@aid[0]); } for (.@j = 0; .@j < .@size; .@j++) { if (.rewardMode == 2) { .@charid = convertpcinfo(.@aid[.@j],CPC_CHAR); .@sender$ = "Rune-Midgarts Kingdom"; .@title$ = "World Boss Reward"; .@body$ = "Congratulations on defeating the World Boss!\r\n "+.@str$+".\r\n \r\n \r\n \r\n \r\n [ Your reward is attached. ]"; if (.reward_id_size) mail .@charid, .@sender$, .@title$, .@body$, .reward_zeny, .reward_id, .reward_amount; else mail .@charid, .@sender$, .@title$, .@body$, .reward_zeny; if (PACKETVER < 20150513 && !getd(".@str_"+.@cid[.@j]) && .@online) { setd ".@str_"+.@cid[.@j],1; message rid2name(.@aid[.@j]),"You've got mail!"; } } else { attachrid( .@aid[.@j], true ); .@name$ = strcharinfo( 0 ); for ( .@k = 0; .@k < .reward_id_size; .@k++ ) { if (checkweight(.reward_id[.@k], .reward_amount[.@k])) getitem .reward_id[.@k], .reward_amount[.@k]; else dispbottom "You can't receive x" + .reward_amount[.@k] + " " + getitemname(.reward_id[.@k]) + " for defeating the World Boss because you're overweight."; } Zeny += .reward_zeny; dispbottom "You have been rewarded for defeating the World Boss."; } } return; } prontera,144,198,4 script World Boss#wb_board 2_BOARD1,{ mes "[World Boss]"; if ($wordBossPop == 1) { mes "Hurry up, " + strcharinfo(0) + "."; mes "A World Boss threat has been raised, a few ago!"; mes "We need all fighters to join!"; if(select("Send me there","No way, I'm not going") == 1) { next; mes "[World Boss Area]"; mes "Right, get ready."; set $wbFighters[getarraysize($wbFighters)], getcharid(3); warp $lastPopMap$, 0, 0; } else { next; mes "[World Boss Area]"; mes "What are you? A coward?"; mes "You'll be blessed when we all be dead..."; } } else { mes "I'm the one you should come to visit when a World Boss will appear."; mes "And believe, it will."; mes "Those monsters are regular, in some kind."; mes "Al mortal, giant...And ridiculously strong..."; } close; OnInit: OnTimer60000: OnEvent: stopnpctimer; initnpctimer; delwaitingroom; if ($wordBossPop) { waitingroom "World Boss Alive",0; end; } .@time = ($WorldBoss_cd - gettimetick(2)); if (.@time < 1) { donpcevent "alawboss::OnStarted"; end; } .@remaining_d = .@time / 86400; .@remaining_h = (.@time % 86400) / 3600; .@remaining_m = (.@time % 3600) / 60; .@remaining_s = .@time % 60; if (.@remaining_d) .@s$[.@i++] = .@remaining_d + " day" + (.@remaining_d>1?"s":""); if (.@remaining_h) .@s$[.@i++] = .@remaining_h + " hour" + (.@remaining_h>1?"s":""); if (.@remaining_m) .@s$[.@i++] = .@remaining_m + " minute" + (.@remaining_m>1?"s":""); if (!.@remaining_d && !.@remaining_h && !.@remaining_m) .@s$[.@i++] = .@remaining_s + " second" + (.@remaining_s>1?"s":""); waitingroom implode(.@s$," "),0; end; }
  9. The commands/functions getunitdmginfo and mobcountunitdmg are custom. These commands are not part of the default scripting commands, you need to add (or remove) them so the script can work.
  10. I'm not sure this is what you asked. You can copy the NPC to put in another map, there are 3 examples. The item data is in the .items array. //===== rAthena Script ======================================= //= Idea Economic Model //===== By: ================================================== //= monyet //============================================================ // NPC: Abas Eden Group (NPC Penjual Item Konsumsi) morocc,172,86,5 script Abas 56,{ mes "[Abas]"; mes "Berikut adalah harga pembelian kami saat ini:"; ShowSellItemList(strnpcinfo(0)); next; ChooseSellItem(strnpcinfo(0)); close; OnInit: //<Item ID>, <Minimum Price>, <Maximum Price>, setarray .items, 12041,200,2500, //Fried Grasshopper Legs 12051,150,2550, //Steamed Crab Nippers 12056,200,2500, //Frog Egg Squid Ink Soup 12066,200,2500, //Fried Monkey Tails 12042,200,2500, //Seasoned Sticky Webfoot 12052,200,2500, //Assorted Seafood 12057,200,2500, //Smooth Noodle 12043,200,2500, //Bomber Steak 12053,200,2500, //Clam Soup 12058,200,2500, //Tentacle Cheese Gratin 12068,200,2500, //Fried Sweet Potato 12054,200,2500, //Seasoned Jellyfish 12059,200,2500, //Lutie Cold Noodle 12069,200,2500, //Steamed Ancient Lips 12070,200,2500; //Fried Scorpion Tails bindatcmd "resetpricesmorocc",strnpcinfo(3) + "::OnReset",99,99; .size = getarraysize(.items); donpcevent strnpcinfo(0)+"::OnReset"; end; OnTimer3600000: OnReset: stopnpctimer(); .@npc = getnpcid(0); for ( .@i = 0; .@i < .size; .@i += 3 ) { setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]); setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]); } initnpctimer(); announce "Pedagang Grup Eden Morocc: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all; end; } // NPC: Abas Veins (NPC Penjual Item ratna) morocc,172,90,3 script Abas#veins 1_M_SIGNMCNT,{ mes "[Abas]"; mes "Saya akan membeli batu langka apa pun yang Anda temukan saat menambang."; if (getgroupid() >= 99) mes " ", "^808080@resetpricesveins^000000 untuk memaksa pengaturan ulang."; next; switch(select("Pembelian harga saat", "Penjual")) { case 1: mes "[Abas]"; mes "Berikut adalah harga pembelian kami saat ini:"; ShowSellItemList(strnpcinfo(0)); break; case 2: ChooseSellItem(strnpcinfo(0)); break; } close; OnInit: //<Item ID>, <Minimum Price>, <Maximum Price>, setarray .items, 718,3000,6000, //Garnet 719,3000,6000, //Amethyst 720,3000,6000, //Aquamarine 721,2500,4500, //Emerald 722,3000,6000, //Pearl 723,2500,4500, //Ruby 725,3000,6000, //Sardonyx 726,2500,4500, //Sapphire 727,3000,6000, //Opal 728,2500,4500, //Topaz 729,2500,4500, //Zircon 969,2000,3500, //Gold 714,10000,20000; //Emperium bindatcmd "resetpricesveins",strnpcinfo(3) + "::OnReset",99,99; .size = getarraysize(.items); donpcevent strnpcinfo(0)+"::OnReset"; end; OnMinute20: OnReset: stopnpctimer(); .@npc = getnpcid(0); for ( .@i = 0; .@i < .size; .@i += 3 ) { setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]); setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]); } initnpctimer(); announce "Pedagang Veins: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all; end; } // NPC: Abas Rachel (NPC Penjual Item) morocc,170,89,3 script Abas#rachel 935,{ mes "[Abas]"; mes "Kuil tersebut mencari artefak terkutuk untuk pemurnian nanti."; if (getgroupid() >= 99) mes " ", "^808080@resetpricesrachel^000000 untuk memaksa pengaturan ulang."; next; switch(select("Pembelian harga saat", "Penjual")) { case 1: mes "[Abas]"; mes "Berikut adalah harga pembelian kami saat ini:"; ShowSellItemList(strnpcinfo(0)); break; case 2: ChooseSellItem(strnpcinfo(0)); break; } close; OnInit: //<Item ID>, <Minimum Price>, <Maximum Price>, setarray .items, 1761,50,200, //Cursed Arrow 724,200,600, //Cursed Ruby 6004,8000,10000, //Cursed Baphomet Doll 12020,1000,2000, //Cursed Water 2728,50000,60000; //Cursed Hand bindatcmd "resetpricesrachel",strnpcinfo(3) + "::OnReset",99,99; .size = getarraysize(.items); donpcevent strnpcinfo(0)+"::OnReset"; end; OnMinute40: OnReset: stopnpctimer(); .@npc = getnpcid(0); for ( .@i = 0; .@i < .size; .@i += 3 ) { setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]); setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]); } initnpctimer(); announce "Pedagang Kuil Rachel: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all; end; } // NPC: Abas Hugel (NPC Penjual Item) morocc,176,90,3 script Abas#hugel 4_M_HUOLDARMY,{ mes "[Abas]"; mes "Halo! Saya membeli barang-barang lokal untuk mendukung pertanian di Hugel."; if (getgroupid() >= 99) mes " ", "^808080@resetpriceshugel^000000 untuk memaksa pengaturan ulang."; next; switch(select("Pembelian harga saat", "Penjual")) { case 1: mes "[Abas]"; mes "Berikut adalah harga pembelian kami saat ini:"; ShowSellItemList(strnpcinfo(0)); break; case 2: ChooseSellItem(strnpcinfo(0)); break; } close; OnInit: //<Item ID>, <Minimum Price>, <Maximum Price>, setarray .items, 519,50,100, //Milk 574,50,100, //Egg 518,100,200, //Honey 577,100,200, //Grain 1026,100,200, //Acorn 581,100,200, //Edible Mushroom 515,100,200, //Carrot 516,100,200, //Sweet Potato 535,100,200, //Pumpkin 517,150,300, //Meat 919,80,100; //Animal Skin bindatcmd "resetpriceshugel",strnpcinfo(3) + "::OnReset",99,99; .size = getarraysize(.items); donpcevent strnpcinfo(0)+"::OnReset"; end; OnMinute00: OnReset: stopnpctimer(); .@npc = getnpcid(0); for ( .@i = 0; .@i < .size; .@i += 3 ) { setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]); setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]); } initnpctimer(); announce "Pedagang Hugel: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all; end; } // Function ShowSellItemList - Tampilkan daftar barang yang dijual function script ShowSellItemList { .@npc = getnpcid(0, getarg(0)); .@size = getvariableofnpc( .size, getarg(0)); copyarray .@items[0], getvariableofnpc( .items[0], getarg(0)), .@size; for ( .@i = 0; .@i < .@size; .@i += 3 ) { .@item_id = .@items[.@i]; .@old_price = getd("$@" + .@npc + "last" + .@items[.@i]); .@price = getd("$@" + .@npc + "_" + .@items[.@i]); if (.@price > .@old_price && .@old_price) setarray .@c$,"^008000","/\\"; else if (.@price < .@old_price) setarray .@c$,"^FF0000","\\/"; mes mesitemlink(.@item_id, false) + ": " + .@c$[0] + F_InsertComma(.@price) + " Z " + .@c$[1] + "^000000"; } return; } // Function ChooseSellItem - periksa inventaris untuk barang yang akan dijual function script ChooseSellItem { disable_items; .@npc = getnpcid(0, getarg(0)); explode(.@npcname$, getarg(0), "#"); .@size = getvariableofnpc( .size, getarg(0)); copyarray .@items[0], getvariableofnpc( .items[0], getarg(0)), .@size; for (.@i = 0; .@i < .@size; .@i+=3) { if (countitem(.@items[.@i]) > 0) { .@menu$ += "^0000FF" + getitemname(.@items[.@i]) + "^000000:"; .@menuindex[.@count++] = .@i; } } if (.@count == 0) { mes "[" + .@npcname$[0] + "]"; mes "Anda tidak memiliki salah satu item yang diterima."; mes "Kembali lagi ketika Anda memiliki sesuatu untuk dijual."; close; } mes "[" + .@npcname$[0] + "]"; mes "Apa yang ingin kamu jual?"; mes "Silakan pilih item yang ingin kamu jual."; .@selected = .@menuindex[select(.@menu$ + "Tidak Jadi") - 1]; clear; if (.@selected < .@count) { mes "[" + .@npcname$[0] + "]"; mes "Baik, mungkin lain kali."; close; } callfunc "SellItem", .@items[.@selected], getd("$@" + .@npc + "_" + .@items[.@selected]), getitemname(.@items[.@selected]); return; } // Function SellItem — penanganan jual item function script SellItem { .@item_id = getarg(0); .@price = getarg(1); .@item_name$ = getarg(2); if (countitem(.@item_id) < 1) { mes "Maaf, sepertinya kamu tidak memiliki "+.@item_name$+"!"; close; } mes "Berapa banyak "+.@item_name$+" yang ingin kamu jual?"; input .@amount; if (.@amount <= 0 || .@amount > countitem(.@item_id)) { mes "Mohon masukkan jumlah yang valid!"; close; } .@total_price = .@amount * .@price; mes "Kamu akan mendapatkan "+.@total_price+" Zeny untuk "+.@amount+" "+.@item_name$+"."; if (select("Jual:Batalkan") == 1) { delitem .@item_id, .@amount; set Zeny, Zeny + .@total_price; mes "Terima kasih telah menjual "+.@amount+" "+.@item_name$+" seharga "+.@total_price+" Zeny!"; } else { mes "Baik, mungkin lain kali."; } close; }
  11. Hi. Find: OnTimer10800000: And replace: OnTimer9000000: //trigger on the minimum time (2.5 hours) sleep rand(1800000); //Waits randomly until the max time (3 hours) Find: monster "prontera",98,186,"Gluttonous Plant",1750,1,"AntHellInvasion::OnInvasionAntHellPlant"; And add below it: setunitdata($@mobid[0], UMOB_DMGIMMUNE, 1); //make Plant not killable
  12. Hello //===== rAthena Script ===========================================| //= Mr.Secrets DressRoom - Custom Request //= 1.5 Added 4th job sprites and item requirements [Racaae] //= https://rathena.org/board/topic/144504-mrsecrets-dressroom-custom-request morocc,167,95,4 script Dress Room#sc 2_M_DYEINGER,{ function RestrictClass; function HasjROCostume; function ChangeAppr; function RestrictClass { .@eaj = eaclass(); if(.@eaj&EAJ_BASEMASK == EAJ_NOVICE) return 0; if(.@eaj&EAJL_2 && roclass(.@eaj|EAJL_UPPER) != -1){ return 1; } return 0; } function HasjROCostume { switch(roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD)) { case Job_Guillotine_Cross: case Job_Genetic: case Job_Royal_Guard: case Job_Arch_Bishop: case Job_Mechanic: case Job_Ranger: case Job_Minstrel: case Job_Wanderer: case Job_Warlock: // Uncomment lines below to enable certain job when their respective jRO costume is released and you patched the sprite in your client. //case Job_Sorcerer: //case Job_Sura: //case Job_Rune_Knight: return 1; default: return 0; } } function ChangeAppr { mes .n$; if (Zeny < .cost_dressroom) { mes "You don't have enough Zeny."; .@missingzeny = true; } .@size = getarraysize(.cost_item); if (.@size > 1) { for ( .@i = 0; .@i < .@size; .@i += 2 ) { if (countitem(.cost_item[.@i]) < .cost_item[.@i+1]) { if (!.@missingitem) { mes "You didn't bring what I need. You're missing:"; .@missingitem = true; } mes .cost_item[.@i+1] + "x " + mesitemlink(.cost_item[.@i]); } } } if (.@missingzeny || .@missingitem) close; switch(getarg(1)){ case 0: // Normal Mode setlook LOOK_BODY2,0; changebase getarg(0); set baselook, getarg(0); break; case 1: // jRO Mode if(!HasjROCostume()) return; changebase roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD); setlook LOOK_CLOTHES_COLOR,0; setlook LOOK_BODY2,!(getlook(LOOK_BODY2)); //atcommand "@bodystyle " + !(getlook(LOOK_BODY2)); baselook = 0; break; } Zeny -= .cost_dressroom; .@size = getarraysize(.cost_item); if (.@size > 1) { for ( .@i = 0; .@i < .@size; .@i += 2 ) delitem .cost_item[.@i], .cost_item[.@i+1]; } mes "Here you are!"; close; } .@TYPE_CHANGEBASE = 0; .@TYPE_SETLOOK = 1; mes .n$; if (!RestrictClass()){ mes "Your class isn't allowed to use my services."; close; } mes "I can change your appearance to another class of your classline!"; if (HasjROCostume()){ mes "I also have a brand new costume for your class!"; } next; mes .n$; if (.cost_dressroom) mes "At a cost of ^FF0000" + F_InsertComma(.cost_dressroom) + "^000000z"; //displaying needed item list .@size = getarraysize(.cost_item); if (.@size > 1) { for ( .@i = 0; .@i < .@size; .@i += 2 ) mes (.@i+3>.@size?"And ":"") + .cost_item[.@i+1] + "x " + mesitemlink(.cost_item[.@i]); } mes "Which class do you want to change your appearance to?"; next; .@option[0] = roclass(eaclass()&EAJ_UPPERMASK); .@option[1] = roclass(eaclass()&EAJ_UPPERMASK|EAJL_UPPER); .@option[2] = roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD); if (.4th) { .@job = roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD); .@option[4] = roclass(eaclass(.@job)|EAJL_FOURTH|EAJL_UPPER); } for(.@i = 0; .@i < (.4th?5:4); .@i++) { if (!.@option[.@i] && HasjROCostume() && !getlook(LOOK_BODY2) && .@option[.@i] != baselook) .@menu$ += "New jRO " + jobname(.@option[2]) + " costume"; else if (.@option[.@i] > 0 && .@option[.@i] != baselook) { if (roclass(eaclass()) == .@option[.@i]) .@menu$ += "Restore " + jobname(.@option[.@i]) + " costume"; else .@menu$ += jobname(.@option[.@i]); } .@menu$ += ":"; } if(select(.@menu$)-1 == 3) { //jRO costume ChangeAppr(0,.@TYPE_SETLOOK); } ChangeAppr(.@option[@menu-1],.@TYPE_CHANGEBASE); end; OnPCLoginEvent: if(baselook && .dress_perma){ changebase baselook; } end; OnInit: .n$ = "[Dress Room]"; // NPC Name .dress_perma = 1; //Changes are saved when player logout (1=Yes / 0=No) .4th = true; //Enable changing to 4th job sprite (True / False) .cost_dressroom = 10000; // Zeny Cost setarray .cost_item,6959,1,982,3,983,2; // Item cost - item ID,Amount,item ID,Amount... end; }
  13. Hi. Add this in \db\import\item_db.yml - Id: 512 Trade: NoDrop: true In this example, Apple (ID 512) cannot be dropped. Change the ID to your item's. PTBR:
  14. Add this to \db\import\instance_db.yml - Id: 200 Name: Mini Endless Tower TimeLimit: 14400 Enter: Map: 1@Mtower X: 50 Y: 355
×
×
  • Create New...