Jump to content

Skorm

Forum Moderator
  • Posts

    1282
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Skorm

  1. The suggested code won't work unless the npc is located on the same map or the players are attached to the script... What I would do in this situation is create a static invisible dummy npc which resides on the map and have him keep the timer. In my experience that is the least resource intensive and the least likely to fail. So basically when your entrance npc starts the event trigger a label (donpcevent() which starts a timer in the dummy npc that will eventually trigger the above script. It's ok to use commands like OnPCLogout & OnPCLogin when they are used in moderation... But if you're just trying to wipe your server of that specific item the best way is though SQL. For example: DELETE FROM `Inventory` WHERE `nameid` = <itemid>;
  2. It's working for me now thank you very much.
  3. Does it need to be inside of my client folder before I can compress GRF files? Because I'm getting this atm. :/
  4. - script quest_block -1,{ OnPCLoadMapEvent: .@map$ = strcharinfo(3); while( .@i++<.len ) if( compare(.map_name$[.@i],.@map$) ) if( checkquest(.quest_id[.@i])!=2 ) { message strcharinfo(0), "You are not authorized to enter this map."; warp "prontera",100,100; } end; OnInit: setarray .quest_id[1], 16146; setarray .map_name$[1], "lhz_dun03"; .len = getarraysize(.map_name$); while( .@i++<.len ) setmapflag .map_name$[.@i], mf_loadevent; } You can also look in quest_db.txt in your server files under db folder it's a little easier because you don't have to extract your data.
  5. Assuming the NPC is located on the same map as all the players in the event.
  6. Brian comes on every now and then but he is very sneaky. O_O;;
  7. This is great, finally someone has made an effort to solidify these base requirements!
  8. This is a great map just makes me want to fill it with all kinds of interesting quest npcs.
  9. This is great! I've struggled trying to sift and sort content because of size restrictions. This will help me greatly, thank you very much.
  10. Did this work for you or no? I'm setting this as solved until you provide an answer.
  11. Replace: .@select$ += "Room "+.@i+" ["+getmapusers(.maps$[.@i])+"/"+.rooms[.@i]+"]:"; With: .@select$ = .@select$ + "Room "+.@i+" ["+getmapusers(.maps$[.@i])+"/"+.rooms[.@i]+"]:";
  12. payon,153,235,4 script DB/MVP Warper 859,{ mes "[Dead Branch Room Warper]"; mes "Which dead branch room would you like to be warped to?"; next; .@len = getarraysize(.maps$); while(.@i++<.@len) .@select$ += "Room "+.@i+" ["+getmapusers(.maps$[.@i])+"/"+.rooms[.@i]+"]:"; select(.@select$); jump_zero((getmapusers(.maps$[@menu])<.rooms[@menu]),L_NoRoom); warp(.maps$[@menu],0,0); end; L_NoRoom: mes "[Dead Branch Room Warper]"; mes "I'm sorry but the maximum users for Room "+@menu+" have been reached."; close; OnInit: setarray .maps$[1], "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05"; setarray .rooms[1], 5 , 4 , 4 , 4 , 4 ; }
  13. Basically there is a different thread floating around about this same topic and the solution was... Hope that helps...
  14. Well it wouldn't be with @emotion anymore because eAthena doesn't have that... Instead it would be "NPC:EMO no1" something like that through npc whisper commands.
  15. Kido, why you never help me with any scripts. #jealous
  16. Maybe you wanted it to work with all classes that are based of the first jobs? BaseClass == Job_Swordman If that still isn't working check to see that the classes are listed properly in your const.txt.
  17. After OnInit: Make an array with item ids like: setarray .items, 501, 502, 503, 504, 506; Then replace or add... getitem(.items[rand(getarraysize(.items))],1); After the script says... set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt;
  18. What part of the script isn't working for you? I just tested it on my test server and it was working fine. *
  19. Currently untested but yeah. prontera,100,100,5 script hourlypoints 139,8,11,{ end; OnTouch: dispbottom "Stay here to get afk hourly points."; attachnpctimer(); startnpctimer(); end; OnTimer3600000: getmapxy(.@map$,.@x,.@y,0); if( distance(.x,.y,.@x,.@y)<=11 && .@map$==.map$ ) { if( !@afk ) { set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt; dispbottom "You received "+.point_amt+" Kafrapoints by staying afk ingame for 1 hour"; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; set @consecutive_hour, @consecutive_hour + 1; if(@consecutive_hour == 3) { set @consecutive_hour,0; set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt; dispbottom "You receive "+.cpoint_amt+" Kafrapoints in afking for 3 consecutive hours"; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; } } else if( @afk>=gettimetick(2) ) { set #KAFRAPOINTS, #KAFRAPOINTS + .off_point_amt; set @consecutive_hour, @consecutive_hour + 1; if(@consecutive_hour == 3) { set @consecutive_hour,0; set #KAFRAPOINTS, #KAFRAPOINTS + .coff_point_amt; } } else { stopnpctimer(); set(.@player$, strcharinfo(0)); detachrid; atcommand "@kick \""+.@player$+"\""; end; } attachnpctimer(); initnpctimer(); } else { dispbottom "You left the afk area and will no longer receive Kafrapoints."; stopnpctimer(); } end; OnAFK: set(@afk,1); atcommand "@afk"; end; OnInit: getmapxy(.map$,.x,.y,1); bindatcmd "afk","hourlypoints::OnAFK"; set .cpoint_amt, 50; //Points gained for consecutive time online. set .point_amt, 10; //Normal points gained. set .coff_point_amt, 10; //Points gained for consecutive time offline. set .off_point_amt, 5; //Normal offline points gained. } prontera,0,0,5 script Offline AFK 100,{ set .@npc$, strnpcinfo(1); mes "["+.@npc$+"]"; mes "Would you like to activate offline afk?"; next; if(select("Yes:No")==2) { mes "["+.@npc$+"]"; mes "Alright, maybe next time."; close; } mes "["+.@npc$+"]"; mes "Ok, how long would you like to afk offline?"; next; set @menu, select(.menu$)-1; if(Zeny>=.pric[@menu]) { set(Zeny, Zeny-.pric[@menu]); mes "["+.@npc$+"]"; mes "See you soon!"; close2; set(@afk,gettimetick(2)+(.time[@menu]*60)); atcommand "@afk"; } else { mes "["+.@npc$+"]"; mes "I'm sorry but it seems you don't have enough Zeny for that..."; close2; } end; OnInit: function t { function s; set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; return ( ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) ); function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); } } setarray .time, 10, 30, 60, 120, 240, 480; //In minutes setarray .pric, 1500, 4400, 8800, 17600 35300, 70000; //In Zeny set .len, getarraysize(.time); unitwarp 0, getvariableofnpc(.map$,"hourlypoints"), getvariableofnpc(.x,"hourlypoints"), getvariableofnpc(.y,"hourlypoints") ; for(set(.@a,0);.@a<.len;set(.@a,.@a+1)) set(.menu$,.menu$+t(.time[.@a]*60)+" for "+.pric[.@a]+" Zeny.:"); } Variations ( shortcuts ) of the command @afk may be used to abuse this system for example @autotrade ( @at )... I recommend you add them after... bindatcmd "afk","hourlypoints::OnAFK"; Like... bindatcmd "autotrade","hourlypoints::OnAFK";
  20. Yeah I modified the post above.
  21. Yeah it depends on what emulator you're using if the warning spawns for that. I'll modify the above script.
  22. mes "^00C5EF[Kafra Employee]^000000"; mes "Here, let me open"; mes "your Guild Storage for you."; mes "Thank you for using"; mes "the Kafra Service."; close2; cutin "", 255; switch(guildopenstorage()){ case 1: mes "^00C5EF[Kafra Employee]^000000"; mes "Oops, I'm sorry but another guild member is using the guild storage"; mes "right now. Please wait until that person is finished."; close; case 2: mes "^00C5EF[Kafra Employee]^000000"; mes "Oops, I'm sorry, but you do not have a guild."; mes "You must belong to a guild in order to access the guild storage."; close; default: } end;
  23. Yeah just a few missing parenthèse... { bonus bAllStats,2; bonus bMaxHPrate,2; bonus bMaxSPrate,2; bonus2 bSubRace,RC_DemiHuman,2; bonus2 bAddRace,RC_DemiHuman,2; if(Class==Job_Swordman) { bonus bMaxHPrate,2; } if(Class==Job_Mage) { bonus bMatkRate,2; } if(Class==Job_Archer) { bonus bAspdRate,2; } if(Class==Job_Acolyte) { bonus bShortWeaponDamageReturn,5; } if(Class==Job_Merchant) { bonus bAtkRate,2; } if(Class==Job_Thief) { bonus bFlee,4; } if(Class==Job_Gunslinger) { bonus bMaxHPrate,2; bonus2 bSubRace,RC_DemiHuman,2; } if(Class==Job_Taekwon) { bonus2 bAddEle,Ele_Holy,6; } },{},{}
  24. Everything regarding status effects can be found here with proper documentation. https://github.com/rathena/rathena/blob/master/doc/item_bonus.txt If you want class dependent effects look for the class here... https://github.com/rathena/rathena/blob/master/db/const.txt Example: if(Class==Job_Acolyte) { bonus bMaxSP,50; } Will increase Acolyte class max sp +50. If you still need help after making a valid attempt (meaning you have item scripts prepared but they're not working) post here again and I'll help you out, but honestly nothing you requested stands out as being extremely hard so you shouldn't have any problems.
  25. Skorm

    investor

    Right... Would you happen to be using an emulator other than rAthena? Or did you make any modifications to the script?
×
×
  • Create New...