n0tttt

Members
  • Content Count

    299
  • Avg. Content Per Day

    0
  • Joined

  • Days Won

    11

n0tttt last won the day on January 24

n0tttt had the most liked content!

Community Reputation

105 Excellent

6 Followers

About n0tttt

  • Rank
    Stapo

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,595 profile views
  1. Isn't this based on my own modification? The var names and announce hex colors are even the same.
  2. Just go to your rAthena npc folder and edit script_custom.conf with Notepad. Add this line anywhere: npc: npc/custom/Events.txt Then copy the "Events.txt" file into the npc/custom folder. You can now talk in-game to the script using @events script command.
  3. You could delete the bindatcmd line, but better use this one since I deleted it altogether: /* Changelog: v1.1 Added option to debuff players when entering the room. Added command to rotate manually. Remove hiding when quitting room. Added lvl checking on command. v1.1a Removed right curly which made dispell function don't work. Sorry. Added color to the npc name in dialog. Added F_InsertPlural use. v1.2 Added waitingroom with player count. */ // You can use this function with other scripts as well. function script dispell { while([email protected]++ < SC_SPL_MATK) { if( [email protected] != SC_WEIGHT50 && [email protected] != SC_WEIGHT90 && [email protected] != SC_NOCHAT && [email protected] != SC_BABY && /* [email protected] != SC_WEDDING && [email protected] != SC_XMAS && [email protected] != SC_SUMMER && [email protected] != SC_HANBOK && [email protected] != SC_OKTOBERFEST && */ [email protected] != SC_JAILED && [email protected] != SC_EXPBOOST && [email protected] != SC_ITEMBOOST ) sc_end [email protected]; } [email protected] = SC_FEAR; while([email protected]++ < SC_AKAITSUKI) sc_end [email protected]; } prontera,147,172,6 script PvP#0 4_M_SAKRAYROYAL,{ [email protected]$ = "^3227cd[PvP Room]^000000"; mes [email protected]$; if(BaseLevel >= .min_lv) { mes "There are ^d40f00"+F_InsertPlural(getmapusers(.map$),"player")+"^000000 inside right now."; mes "Do you want to enter to the room?"; if(.debuff) mes "^8b0d1fBe careful, because every buff you have will be lost upon entering the room.^000000"; next; if(select("Yes.","No, thanks.") == 1) { specialeffect2 F_Rand(EF_STORMKICK1,EF_STORMKICK2,EF_STORMKICK3,EF_STORMKICK6,EF_STORMKICK7); sleep2 600; specialeffect2 F_Rand(EF_SPINMOVE,EF_CASTSPIN2); sleep2 550; if(.debuff) dispell(); warp .map$,0,0; mapannounce .map$,strcharinfo(0)+" has entered the room.",bc_map,0xb50505; if(!.waiting_room) donpcevent "PvP#0::OnWaitingRoom"; } } else { mes "You must be at least level "+.min_lv+" to be able to enter the room."; close; } end; OnInit: // Command to rotate the room maually. bindatcmd "rotatepvp","PvP#0::OnMinute00",60; // Min LvL to enter the room. .min_lv = 50; // Will players be dispelled upon entering the room? .debuff = false; OnMinute00: OnMinute30: // PvP maps go here. Change them as you wish. setarray [email protected]$[0], "guild_vs2","guild_vs3","guild_vs5","pvp_y_1-1","guild_vs4","guild_vs1","arena_room"; // Max amount of times a map can be repeated. 0 = unlimited. [email protected] = 3; [email protected] = getarraysize([email protected]$); if(.map$ == "") { // You can edit the room mapflags here. setarray [email protected][0], mf_nosave, mf_nodrop, mf_novending, mf_noteleport, mf_noreturn, mf_nowarp, mf_nowarpto, mf_nomemo, mf_nopenalty, mf_nobranch, mf_hidemobhpbar, mf_pvp, mf_pvp_noguild, mf_pvp_noparty, mf_pvp_nocalcrank, mf_loadevent; [email protected] = getarraysize([email protected]); while([email protected]) { [email protected] = [email protected]; while([email protected]) setmapflag [email protected]$[[email protected]],[email protected][[email protected]]; } } [email protected]$ = .map$; [email protected] = rand([email protected]); .map$ = [email protected]$[[email protected]]; if([email protected] && .map$ == [email protected]$) { if(++.row >= [email protected]) { deletearray [email protected]$[[email protected]],1; .map$ = [email protected]$[rand([email protected] - 1)]; .row = 0; } } else if(.row) { .row = 0; } if(.map$ != [email protected]$ && [email protected]$ != "") { mapwarp [email protected]$,.map$,0,0; sleep 2500; mapannounce .map$,"The PvP Room has changed!",bc_npc,0xe53a12; } end; OnWaitingRoom: .waiting_room = true; while(true) { [email protected] = getmapusers(.map$); if([email protected] != [email protected]_count) { [email protected]_count = [email protected]; delwaitingroom; waitingroom F_InsertPlural([email protected],"player")+".",0; } sleep 2500; } end; }
  4. Probably the map you warped to didn't have the mf_loadevent mapflag. You can use this version anyways. I avoided doing it this way since it can cause a bit of lagging. /* Changelog: v1.1 Added option to debuff players when entering the room. Added command to rotate manually. Remove hiding when quitting room. Added lvl checking on command. v1.1a Removed right curly which made dispell function don't work. Sorry. Added color to the npc name in dialog. Added F_InsertPlural use. v1.2 Added waitingroom with player count. v1.3 Use of pcblock command. */ // You can use this function with other scripts as well. function script dispell { while([email protected]++ < SC_SPL_MATK) { if( [email protected] != SC_WEIGHT50 && [email protected] != SC_WEIGHT90 && [email protected] != SC_NOCHAT && [email protected] != SC_BABY && /* [email protected] != SC_WEDDING && [email protected] != SC_XMAS && [email protected] != SC_SUMMER && [email protected] != SC_HANBOK && [email protected] != SC_OKTOBERFEST && */ [email protected] != SC_JAILED && [email protected] != SC_EXPBOOST && [email protected] != SC_ITEMBOOST ) sc_end [email protected]; } [email protected] = SC_FEAR; while([email protected]++ < SC_AKAITSUKI) sc_end [email protected]; } prontera,147,172,6 script PvP#0 4_M_SAKRAYROYAL,{ [email protected]$ = "^3227cd[PvP Room]^000000"; mes [email protected]$; if(BaseLevel >= .min_lv) { mes "There are ^d40f00"+F_InsertPlural(getmapusers(.map$),"player")+"^000000 inside right now."; mes "Do you want to enter to the room?"; if(.debuff) mes "^8b0d1fBe careful, because every buff you have will be lost upon entering the room.^000000"; next; if(select("Yes.","No, thanks.") == 1) { specialeffect2 F_Rand(EF_STORMKICK1,EF_STORMKICK2,EF_STORMKICK3,EF_STORMKICK6,EF_STORMKICK7); sleep2 600; specialeffect2 F_Rand(EF_SPINMOVE,EF_CASTSPIN2); sleep2 550; if(.debuff) dispell(); warp .map$,0,0; mapannounce .map$,strcharinfo(0)+" has entered the room.",bc_map,0xb50505; if(!.waiting_room) donpcevent "PvP#0::OnWaitingRoom"; } } else { mes "You must be at least level "+.min_lv+" to be able to enter the room."; close; } end; OnInit: // This command can be used to enter the PvP Room. bindatcmd "pvp","PvP#0::OnCommand"; // Command to rotate the room maually. bindatcmd "rotatepvp","PvP#0::OnMinute00",60; // Min LvL to enter the room. .min_lv = 50; // Will players be dispelled upon entering the room? .debuff = false; OnMinute00: OnMinute30: // PvP maps go here. Change them as you wish. setarray [email protected]$[0], "guild_vs2","guild_vs3","guild_vs5","pvp_y_1-1","guild_vs4","guild_vs1","arena_room"; // Max amount of times a map can be repeated. 0 = unlimited. [email protected] = 3; [email protected] = getarraysize([email protected]$); if(.map$ == "") { // You can edit the room mapflags here. setarray [email protected][0], mf_nosave, mf_nodrop, mf_novending, mf_noteleport, mf_noreturn, mf_nowarp, mf_nowarpto, mf_nomemo, mf_nopenalty, mf_nobranch, mf_hidemobhpbar, mf_pvp, mf_pvp_noguild, mf_pvp_noparty, mf_pvp_nocalcrank, mf_loadevent; [email protected] = getarraysize([email protected]); while([email protected]) { [email protected] = [email protected]; while([email protected]) setmapflag [email protected]$[[email protected]],[email protected][[email protected]]; } } [email protected]$ = .map$; [email protected] = rand([email protected]); .map$ = [email protected]$[[email protected]]; if([email protected] && .map$ == [email protected]$) { if(++.row >= [email protected]) { deletearray [email protected]$[[email protected]],1; .map$ = [email protected]$[rand([email protected] - 1)]; .row = 0; } } else if(.row) { .row = 0; } if(.map$ != [email protected]$ && [email protected]$ != "") { mapwarp [email protected]$,.map$,0,0; sleep 2500; mapannounce .map$,"The PvP Room has changed!",bc_npc,0xe53a12; } end; OnCommand: [email protected]_id = instance_id(); [email protected]$ = strcharinfo(3); if(([email protected]_id || instance_mapname([email protected]$,[email protected]_id) == "") && BaseLevel >= .min_lv) { if([email protected]$ != .map$) { message strcharinfo(0),"Preparing to enter!"; } else { message strcharinfo(0),"Quitting the room..."; unitstopwalk getcharid(3); //pcblock PCBLOCK_MOVE|PCBLOCK_ATTACK|PCBLOCK_SKILL,true; pcblockmove getcharid(3),true; pcblockskill getcharid(3),true; setoption OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK,false; } [email protected] = HP; sleep2 1400; while([email protected]++ < 5) { message strcharinfo(0),(6 - [email protected])+"..."; sleep2 990; if(HP < [email protected]) { message strcharinfo(0),"You can't do this in the middle of a battle."; //pcblock PCBLOCK_MOVE|PCBLOCK_ATTACK|PCBLOCK_SKILL,false; pcblockmove getcharid(3),false; pcblockskill getcharid(3),false; end; } } specialeffect2 F_Rand(EF_STORMKICK1,EF_STORMKICK2,EF_STORMKICK3,EF_STORMKICK6,EF_STORMKICK7); sleep2 600; specialeffect2 F_Rand(EF_SPINMOVE,EF_CASTSPIN2); sleep2 550; if([email protected]$ != .map$) { if(.debuff) dispell(); warp .map$,0,0; mapannounce .map$,strcharinfo(0)+" has entered the room.",bc_map,0xb50505; if(!.waiting_room) donpcevent "PvP#0::OnWaitingRoom"; } else { warp "SavePoint",0,0; //pcblock PCBLOCK_MOVE|PCBLOCK_ATTACK|PCBLOCK_SKILL,false; pcblockmove getcharid(3),false; pcblockskill getcharid(3),false; } } else if(BaseLevel < .min_lv) { message strcharinfo(0),"You must be at least level "+.min_lv+" to be able to enter the room."; } else { message strcharinfo(0),"You can't enter the room in the middle of an instance."; } end; OnWaitingRoom: .waiting_room = true; while(true) { [email protected] = getmapusers(.map$); if([email protected] != [email protected]_count) { [email protected]_count = [email protected]; delwaitingroom; waitingroom F_InsertPlural([email protected],"player")+".",0; } sleep 2500; } end; }
  5. You don't have the last version of rAthena. But you can change this line: getmapxy [email protected]$,[email protected],[email protected],BL_NPC; to: getmapxy [email protected]$,[email protected],[email protected],UNITTYPE_NPC;
  6. payon,147,229,4 script Test#HPbar 1_F_MARIA,{ if (.HP_Bar == false) { .HP_Bar = true; .mobGID = monster ("payon",148,226,"[T] HP Test",1031,1,strnpcinfo(0)+"::OnDie"); setunitdata .mobGID,UMOB_MAXHP,4000; setunitdata .mobGID,UMOB_HP,4000; [email protected] = getmapunits(BL_PC, "payon", [email protected]); for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { attachrid [email protected][[email protected]]; addtimer(0,strnpcinfo(0)+"::OnHPBar"); } } end; OnDie: .HP_Bar = false; end; OnHPBar: [email protected]_MAXHP = getunitdata (.mobGID,UMOB_MAXHP); while (.HP_Bar != false) { [email protected]_HP = getunitdata (.mobGID,UMOB_HP); [email protected]_HP = (@.U_HP*100)/[email protected]_MAXHP; cutin([email protected]_HP+"", 1); sleep2 100; } cutin("0_hpbar", 1); sleep2 5000; //Delay to hide HP Bar cutin("", 255); end; } This could be done for every MvP, but the way it's done (by adding a script and an attach every player on the map, adding new players on the map, and show them the HP every 100ms) would generate a lot of lag. I'd recommend using this for a special event mostly, and even that would be resource-intensive. Another way could be adding only the characters who attack the MvP with a custom label like OnAttack. I think there's such a label floating around boards.
  7. Something like this? - script Hourly_Rewards -1,{ OnAddMinute: #online_time++; if(#online_time % 5 == 0) { dispbottom "Time online: "+Time2Str(#online_time*60 + gettimetick(2))+"."; if(#online_time % 60 == 0) { [email protected]_points = #hourly_points; [email protected] = ((#online_time / 60) + 5)%6 + 1; switch([email protected]) { case 1: #hourly_points += 10; break; case 2: #hourly_points += 20; break; case 3: #hourly_points += 30; break; case 4: #hourly_points += 10; break; case 5: #hourly_points += 10; break; case 6: #hourly_points += 30; break } dispbottom "You won "+(#hourly_points - [email protected]_points)+" points. Current amount:"+F_InsertComma(#hourly_points)+"."; } } OnPCLoginEvent: addtimer 60000,"Hourly_Rewards::OnAddMinute"; end; }
  8. n0tttt

    R> Map Access

    I didn't read completely. In any case, he can disable every NPC, disable every outside player, and disable every item or skill which might warp players out of there. Something like this? - script Event_Novice -1,{ bindatcmd "startnovice","Event_Novice::OnStart"; bindatcmd "endnovice","Event_Novice::OnEnd"; end; OnStart: setmapflag "new_1-1",mf_noexp; setmapflag "new_1-1",mf_nowarp; setmapflag "new_1-1",mf_nowarpto; setmapflag "new_1-1",mf_noskill; setmapflag "new_1-1",mf_noitemconsumption; setmapflag "new_1-1",mf_loadevent; .size = getunits(BL_NPC,"new_1-1",.npc$); freeloop true; for([email protected] = 0;[email protected] < .size;[email protected]++) disablenpc .npc$[[email protected]]; /* [email protected] = getunits(BL_MOB,"new_1-1",[email protected]); for([email protected] = 0;[email protected] < [email protected];[email protected]++) unitkill [email protected][[email protected]]; */ [email protected] = getunits(BL_PC,"new_1-1",[email protected]$); for([email protected] = 0;[email protected] < [email protected];[email protected]++) { if(readparam(Class,[email protected]$[[email protected]]) != Job_Novice) warp "SavePoint",0,0,getcharid(0,[email protected]$[[email protected]]); } freeloop false; end; OnEnd: for([email protected] = 0;[email protected] < .size;[email protected]++) enablenpc .npc$[[email protected]]; deletearray .npc$; .size = 0; removemapflag "new_1-1",mf_noexp; removemapflag "new_1-1",mf_nowarp; removemapflag "new_1-1",mf_nowarpto; removemapflag "new_1-1",mf_noskill; removemapflag "new_1-1",mf_noitemconsumption; removemapflag "new_1-1",mf_loadevent; end; OnPCLoadMapEvent: if(strcharinfo(3) == "new_1-1" && Class != Job_Novice) warp "SavePoint",0,0; end; } I don't know what kind of event it is (GM-controlled?), but if he needs some NPCs, he can just add them with enablenpc. Forgot to mention why I added noexp. In case some people create party or guild. Actually don't remember how it works for guilds, but if it does like I think, player couldn't lvl up then couldn't join a guild and then escape by Emergency Recall or something like that. Anyways I don't know what kind of event is this (Zombie event?).
  9. n0tttt

    R> Map Access

    It also checks on warps. npc.cpp: switch(mapdata->npc[i]->subtype) { case NPCTYPE_WARP: if ((!mapdata->npc[i]->trigger_on_hidden && (pc_ishiding(sd) || (sd->sc.count && sd->sc.data[SC_CAMOUFLAGE]))) || pc_isdead(sd)) break; // hidden or dead chars cannot use warps if (!pc_job_can_entermap((enum e_job)sd->status.class_, map_mapindex2mapid(mapdata->npc[i]->u.warp.mapindex), sd->group_level)) break; if(sd->count_rewarp > 10){ ShowWarning("Prevented infinite warp loop for player (%d:%d). Please fix NPC: '%s', path: '%s'\n", sd->status.account_id, sd->status.char_id, mapdata->npc[i]->exname, mapdata->npc[i]->path); sd->count_rewarp=0; break; } pc_setpos(sd,mapdata->npc[i]->u.warp.mapindex,mapdata->npc[i]->u.warp.x,mapdata->npc[i]->u.warp.y,CLR_OUTSIGHT); break;
  10. - script Sample -1,{ OnPCLoginEvent: mes "[Points Viewer]"; mes "Hello "+strcharinfo(0); mes ""+#CASHPOINTS+" Cash and "+#KAFRAPOINTS+" Free Cash."; mes "-----------------------------------"; mes "Time VIP left"; mes Time2Str(vip_status(VIP_STATUS_REMAINING) + gettimetick(2)); mes "-----------------------------------"; close; } Or Time2Str(VIP_STATUS_EXPIRE)
  11. n0tttt

    R> Map Access

    db/import/job_noenter_map.txt JOB_NOVICE,1,100 Something like this?
  12. Like this? prontera,155,175,4 script TestScript 69,{ setarray [email protected]_id, 1002, 1004, 1005; setarray [email protected]_qt, 1, 3, 8; setarray [email protected]_req, 7, 8, 10; for(; [email protected] < getarraysize([email protected]_id); [email protected]++){ if([email protected]_qt[[email protected]] >= [email protected]_req[[email protected]]) { dispbottom "You hunted down all the monsters on that map."; } else { dispbottom "You still have to hunt down the following monsters:"; dispbottom "MonsterID: "[email protected]_id[[email protected]]+" Amount: "[email protected]_qt[[email protected]]+" Required quantity: "[email protected]_req[[email protected]]; [email protected] += ([email protected]_req[[email protected]] - [email protected]_qt[[email protected]]); } } if([email protected]) dispbottom "You still need to hunt "+F_InsertPlural([email protected],"monster")+"."; end; }
  13. - script Lucky_Draw -1,{ OnMinute00: [email protected]_id = 512; [email protected]_amt = 5; if(gettime(DT_HOUR) % 2 == 0) { [email protected] = getunits(BL_PC,[email protected]); [email protected] = [email protected][rand([email protected])]; attachrid [email protected]; announce strcharinfo(0)+" has won the Lucky Draw ("+F_InsertPlural([email protected]_amt,getitemname([email protected]_id))+").",bc_all; if(checkweight([email protected]_id,[email protected]_amt)) getitem [email protected]_id,[email protected]_amt; else mail getcharid(0),"Lucky Draw","Prize","Heres the Lucky Draw Prize",0,[email protected]_id,[email protected]_amt; } end; }