Jump to content

llchrisll

Members
  • Posts

    626
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by llchrisll

  1. @Emistry That wasn't supposed to be an variable ^^. @integral You don't require initnpctimer; after you the addtimer Still it would be the best to post your script. Because if you didn't add "{" and "}" at the warp part: OnWarp: if(getmapusers("map") < player_limit) warp "map.gat",x,y; else dispbottom strnpcinfo(1)+": This map has reached the maximum players which can stay on this map."; end; should be then this: OnWarp: if(getmapusers("map") < player_limit) { addtimer 300000,strnpcinfo(3)+"::On5Minutes"; warp "map.gat",x,y; } else dispbottom strnpcinfo(1)+": This map has reached the maximum players which can stay on this map."; end; before only the next command would have been executed. another one would have been ignored. Regards, Chris
  2. To create an chat room: Example: OnInit: while(1) { waitingroom "Teleporter - Users: "+getmapusers("map"),20,strnpcinfo(0)+"::OnWarp",1; sleep 2000; delwaitingroom; } end; OnWarp: if(getmapusers("map") < player_limit) warp "map.gat",x,y; else dispbottom strnpcinfo(1)+": This map has reached the maximum players which can stay on this map."; end; As for the timer there are different ways to do. It depends on what do you want to do, but the easiest way would be using this: The script above is only an snippet ^^. Regards, Chris Edit: o.o Somehow the paramters of those scripts won't be posted, though it's in the editor self, why is that?
  3. @Mirage: Lol? That will never work. The config has to be inside of the npc or the map server prints syntax error o.o. Also: set .name@, "[NPC Name]"; // NPC Name that kind of variable doesn't exist Should be: set .@name$,"[NPC Name]"; Next mistake: set @GID2,getcharid(2{"@player$"}); if(@GID2)==@GID) goto L_NotGuild; should be: set @GID2,getcharid(2,@player$); if(@GID2 != @GID) goto L_NotGuild; getcharid(2{"@player$"}): I guess you took the example from the doc/script_commands.txt the {} stats it's optional also you were missing the "," after the 2. If that is not given it takes the attached player to the npc. By putting "" the name of the char is exactly like that. To use an variable remove them like I did. if(@GID2)==@GID): First error would be ")" unmatch second would be if the player is the same guild it would print that he/she is not in your guild which isn't the purpose. Use "!=", which means is NOT equal to like: if(10 != 5) would be true, since 10 is not equal to 5 right ? I also saw these lines: close; end; The "end;" is not necesarry in this case, since "close;" ends the script already. It would be different if you had used "close2;" which closes the message window but doesn't end the script. I hope you understand those commands a bit better now^^. But for correction here is my modified script: Pastebin.com Regards, Chris
  4. First: I would move the addtimer 300000, strnpcinfo(3)+"::On5Minutes"; before the warp not before you check if users are already on that map. Second: To add the price add this set .@id,7720; if(countitem(.@id) < 1) { mes "You need at least 1x "+getitemname(.@id)+" to teleport."; close; } after set .@map$,"turbo_room"; and this delitem .@id,1; after warp .@map$,100,100; I hope was able to help . Regards, Chris
  5. What exactly is not working? Regards, Chris
  6. Those are 7-Zip files, convertor: 7-Zip.org. After installing, right-click one of those files and choose drop menu "7-Zip" > "Unpack..." or "Unpack here"
  7. Okay I will test them after I get back from work, will be in about 4 hrs back . Does the map server say anything? Regards, Chris Edit: Well I didn't tested after I found the bug, but please try for yourself. Use the old link, updated it - should be v1.1^^
  8. Sorry for the late reply, had some other scripts to finish . Here are the 4 NPC's, the 2nd I divided into two options: Either with refine till +3 (+4 won't be accepted) or without any refine. More Info is listed in the NPC Header: Here is the link: Pastebin.com Also they are untested. Credits goes to Emistry for his example, I also put that into the header D:. Regards, Chris
  9. Here is the script I made, I tested it and it worked. Pastebin.com But as far as I know my scripting skills, there can always be some bugs left. In case you find some, please drop me an PM . Regards, Chris
  10. GM= Game Master or Guild Master and which Item ID. Game Master: Which Level should be the max changeable? (Well, I'm sure this isn't case, but just curious ) Guild Master: Access only Guild Master himself or Guild Members too? Regards, Chris
  11. Well, here is an warper. prontera,150,180,0 script Limited PvP 100,{ mes .n$; if(Class != .class) { mes "I'm sorry, but only "+jobname(.class)+"s are allowed to join this PvP Room.", close; } mes "Do you want to go to the PvP Room?"; if(select("- Yes:- No") - 1) close; close2; warp .map$[0],.map$[1],.map$[2]; end; OnInit: set .n$,"["+strcharinfo(0)+"]"; // NPC Name set .class,Job_Champion; // Allowed Class setarray .map$[0],"mapname.gat","x","y"; // Coordinates: These entries require the '"'. end; } Untested btw . Regards, Chris
  12. Wtf? Let me ask you something.... What means ">=" for you? - script AttendanceScript -1,{ OnPCLoginEvent: dispbottom "Welcome back!"; dispbottom "Thanks your for playing WhateverRO!"; if (#LoginTracker>=gettimetick(2)) { set #DailyLoginCount,#DailyLoginCount+1; set #LoginTracker,gettimetick(2)+86400; end; } This will never work, escpecially on the first execution. Reason: The scripts checks for the value of "#LoginTracker", but since it's the first exection it has the value of "0". And gettimetick(2) gets the UNIX Time in seconds, which is obviously higher than 0. Hint: Read the doc/script_commands.txt for more info. Next explanation: The "#LoginTracker" only increases when the "if" is true, which can't happen (like stated above) and the gettimetick(2) ALWAYS continues to count the seconds. >= means Higher and equal <= means Less and equal Also to make tit an "clickable" NPC, try changing the header. Currently it's an floating NPC. Example: prontera,150,180,0%TAB%script%TAB%Login Tracker%TAB%100,{ I hope I could explain it properly. Regards, Chris
  13. I would change the if (#LoginTracker>=gettimetick(2)) { into if (#LoginTracker <= gettimetick(2)) { Attention at the ">=" from yours and "<=" from mine . Now think what could that mean ^^. If you can solve this, I'll give you a cookie . Regards, Chris
  14. First: @Rikimaru: What kind of nonsense is that? Shouldn't the "goto OnFree;" be an "end;"? And why creating an unnecesarry label? Result: if(BaseLevel < 99) end; Or you could do: if(BaseLevel < 99) goto OnDeny; ~ Level Requirement Pass - Code ~ OnDeny: mes "You don't have the required level for an freebie."; mes "Come back when you reached it - Base Level 99!"; close; Please don't take that as an insult please, was just stating that mistake . @TS: About 2.: "#variable" is already an permanent account bound variable. That means it will be used for the whole account. As for the IP Check: That would require SQL and also there is the problem of dynamical IP's, which changes after each router restart (I think, I have a fixxed IP so I can't say for sure) Regards, Chris Note: I already got a nice script on my notepad++, just have to test , with some configs easily changeable .[/advertize]
  15. well i would also add an check if the event hasn't ended yet
  16. Hmm @Zac: It seems like your "Portal" lacks the map where it should be o.o. 155,181,4[TAB]script[TAB]Portal[TAB]45,2,2,{ And the purpose of this: OnInit: donpcevent "Portal::OnDisable"; //So the event wont start without GM's access end; OnDisable: // The NPC do Nothing without GM's Access end; is useless, since "OnMinute00" will execute netherless. Here is my script - your script modified yet untested: prontera,155,185,4 script Event Manager 81,{ if (getgmlevel() >= 60) { // Edit to your desired GM Level mes "[ Event Manager ]"; mes "What do you want to do?"; menu "Start the Event",start,"Stop the Event",stop,"Nothing",-; close; start: next; mes "[ Event Manager ]"; mes "Do you want to start it now or let the timer do the job?"; if(select("- Now:- Timer") - 1) donpcevent "Portal::OnStart"; else donpcevent "Portal::OnEnable"; close; stop: donpcevent "Portal::OnDisable"; // Disable Event close; } end; // The NPC cannot be clicked by normal players. } prontera,155,181,4 script Portal 45,2,2,{ OnInit: donpcevent "Portal::OnDisable"; //So the event wont start without GM's access end; OnTouch: if( .Event ) warp "guild_vs5",0,0; end; OnDisable: // The NPC do Nothing without GM's Access set .DoEvent,0; set .Event,0; end; OnEnable: // Just allow the event to be started automatic set .DoEvent,1; end; OnStart: // Activate the event and start it immediatly. set .DoEvent,1; OnMinute00: if(!.DoEvent) end; set .Event,1; hideoffnpc strnpcinfo(0); announce "Loot event has started. Rush to the Portal.",0; sleep ( 30 * 1000 ); // How long Portal Open ? announce "Portal will be close by now..",0; hideonnpc strnpcinfo(0); set .Event,0; monster "guild_vs5",0,0,"Name",1002,30,strnpcinfo(0)+"::OnMobKilled"; sleep ( 60 * 1000 ); // Last how long the Event ? killmonster "guild_vs5","All"; mapwarp "guild_vs5","prontera",155,181; end; OnMobKilled: monster "guild_vs5",0,0,"Name",1002,1,strnpcinfo(0)+"::OnMobKilled"; end; } Like I saied, it's untested. Regards, Chris
  17. The script I have is an "Hero Fame Gaining System", which handles that by PvP Kills/Deaths. Regards, Chris Note: If you still want to see an snippet, tell me. I will do so then via PM ^^ or like that.
  18. Hmm, if it's the same as I have on my HD, well extern HD, then I could show paste it. If I'm not wrong, the hero system I have upgrades you "Hero" Status via the character variable "Fame" and another. Though I'm not quite sure yet, how this works since I only took a look at the first lines. I will post an snippet of the script later (2 a.m. here already o.o). Regards, Chris
  19. Wouldn't be strcharinfo(3) more easier to use? Since it's the same thing except it only returns the map name ^^. Regards, Chris
  20. Try this, click me. Just edit this set .@cost,5000; // 5k Zeny per Item to your price you want. In this case "300" D: Regards, Chris
  21. In that case this code would be the correct one: mes ( (!getcharid(2,.@name$[.@i]))?"No Guild":getguildname(getcharid(2,.@name$[.@i]))); This is a called a short-if. completed it would be look like this: if(!getcharid(2,.@name$[.@i])) // Player doesn't have an guild. mes "No Guild"; else // Player has one D: mes getguildname(getcharid(2,.@name$[.@i])); So with an short-if you can make the script shorter . Regards, Chris Note: I'm pretty sure "short-if" has an another term, I saw somewhere o.o. Can't remember though where.
  22. Hmm, looks like from my InGame CP D:, to specify the source more ;O. Don't got a problem with so don't worry. About the guild. Instead of getting the guild name via SQL wouldn't that be more better:? getguildname(getcharid(2,.@name$[.@i])) So in this case you won't the "JOIN" part in the sql query. Regards, Chris
  23. Well, Adapation can't start an song as far as I know D:. Put this in the last {} of your item: So it will look that with all three: {},{},{ itemskill "BD_ADAPTATION",1; } So when you unequip that weapon the "Adapation to Circumstances" will be used. Untested btw. Regards, Chris
  24. llchrisll

    Help

    Well how to say: Each switch() has to end their own block, you can't add the "}" at the end of the file. Look at the modified script of mine: prontera,93,97,5 script Larry 953,{ mes "[Larry]"; mes "Hello stranger,who are you?"; next; switch(select("I am "+strcharinfo(0)+":Your friend Tom sent me here")) { case 1: mes "[Larry]"; mes "Hello"+strcharinfo(0)+" what do you want?"; next; switch(select("Buy items:Nothing.Bye")) { case 1: mes "[Larry]"; mes "Well, I have a sword and an armor.What do you want?"; next; switch(select("I want the sword:I want the armor")) { case 1: mes "[Larry]"; mes "The sword costs 1000000.Do you want to buy?"; next; switch(select("Yes….I do:No,sorry")) { case 1: mes "[Larry]"; if(Zeny < 1000000) { mes "You don't have the required amount of Zeny."; close; } mes "Ok here you have your sword."; next; getitem 13062,1; set Zeny,Zeny-1000000; next; mes "[Larry]"; mes "Ok good bye."; close; case 2: mes "[Larry]"; mes "Oh….Well.So good bye."; close; } case 2: mes "[Larry]"; mes "The armor costs 2000000.Do you want to buy it?"; next; switch(select("Yes,I do:No sorry")) { case 1: mes "[Larry]"; if(Zeny < 2000000) { mes "You don't have the required amount of Zeny."; close; } mes "Ok.Here you have your armor."; next; getitem 2751,1; set Zeny,Zeny-2000000; next; mes "[Larry]"; mes "Ok good bye."; close; case 2: mes "[Larry]"; mes "Oh…Well I will find someone else.Bye"; close; } } case 2: mes "[Larry]"; mes "Ok.Goodbye"; close; } case 2: mes "[Larry]"; mes "Ahhh yes you are"+strcharinfo(0)+" what do you want?"; next; switch(select("Buy items:Nothing.Bye")) { case 1: mes "[Larry]"; mes "Well, I have a sword and an armor.What do you want?"; next; switch(select("I want the sword:I want the armor")) { case 1: mes "[Larry]"; mes "The sword costs 500000.Do you want to buy?"; next; switch(select("Yes….I do:No,sorry")) { case 1: mes "[Larry]"; if(Zeny < 500000) { mes "You don't have the required amount of Zeny."; close; } mes "Ok here you have your sword."; next; getitem 13062,1; set Zeny,Zeny-500000; next; mes "[Larry]"; mes "Ok good bye."; close; case 2: mes "[Larry]"; mes "Oh….Well.So good bye."; close; } case 2: mes "[Larry]"; mes "The armor costs 1000000.Do you want to buy it?"; next; switch(select("Yes,I do:No sorry")) { case 1: mes "[Larry]"; if(Zeny < 1000000) { mes "You don't have the required amount of Zeny."; close; } mes "Ok.Here you have your armor."; next; getitem 2751,1; set Zeny,Zeny-1000000; next; mes "[Larry]"; mes "Ok good bye."; close; case 2: mes "[Larry]"; mes "Oh…Well I will find someone else.Bye"; close; } } case 2: mes "[Larry]"; mes "Ok.Goodbye"; close; } } } Also you forgot to check if the player has the required amount of Zeny for these items. "if(Zeny < xxxx) {" Regards, Chris
  25. In my opinion this would be an src edit to disable/check if this npc is used or not. Well here is my script: prontera,150,180,0 script SavePoint 100,{ set .n$,"["+strnpcinfo(1)+"]"; setarray .x[0],50,60,70,80,90; setarray .y[0],50,60,70,80,90; mes .n$; mes "Do you want to save?"; if(select("- Yes:- No") - 1) close; next; set n_save,1; mes .n$; Your Savepoint has been saved."; close; OnPCDieEvent: if(n_save) { set coord,rand(6); warp "SavePoint",.x[coord],.y[coord]; } end; } I hope it's working and it was of help. Regards, Chris
×
×
  • Create New...