Jump to content

GmOcean

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by GmOcean

  1. prontera,150,180,4 script GuildName Changer 123,{ mes "Input your new guild name."; input .@name$; set .@a$,charat(.@name$,0); //We run this so we can see if the first "character" is a Space. if( !compare("1234567890",.@a$) && !charisalpha(.@a$,0) ){mes "^FF0000 INVALID NAME ^000000"; close;} //We've determined it's a Space so invalid name. set .@n$,escape_sql(.@name$); query_sql("UPDATE guild SET name='"+ .@n$ +"' WHERE guild_id='"+ getcharid(2) +"'"); next; mes "Guild name successfully updated."; close; Not sure if the update will show without a relog or not. You'd have to test.
  2. It doesn't bind to maps individually but it i the best method to track deaths, in comparison to other methods such as seeing if anyone dropped to 0 HP in a continuous every second. Just add a map check with the OnPCDieEvent to compare it to it's instanced version. OnPCDieEvent: if( instance_mapname(strcharinfo(3)) == instance_mapname("prontera") ){end;} dispbottom "A shame. Maybe next time. Come back when your stronger kid."; instance_destroy; end; I don't know why it is like this, but from my tests, the if(statement) needs to be == instead of != to actually end. Otherwise people outside of an instance would trigger the event. But it could just be that my revision is outdated. At any rate, you should be able to properly run a similar check to fit your needs, so that you can perform script functions without interference from other scripts.
  3. I'm looking to see if anyone is able / wiling to make a new npc script command, that will function as so: prontera,150,180,4 script TestNPC 123,{ mes "A"; // mes A, B & C all appear in the same text box. mes "B"; mes "C"; menu "D",-; mes2 "E"; // Appears in a new Text box, without the need to press NEXT. Currently the only way to do this is by use of next; command: prontera,150,180,4 script TestNPC 123,{ mes "A"; mes "B"; mes "C"; menu "D",-; next; // Want to bypass this but keep same effect of clearing text box. mes "E"; Anyone have an idea on how to do this?
  4. Not if you MUTE the player. Even ALT+M short-cuts are blocked if the player is MUTED. And if the only reason were going to implement this is to make players unable to use commands at X time. Then there is a quick work around. 1. Simply Make all Players part of Group 1. 2. Make Group 1 have all the commands you want. 3. When the bot checker or anti-Hack script runs, make it change their group to Group 0. (By default no commands are usable.) 4. If they fail, and get banned or kicked, simply turn their Group back to 1, before doing any of the final charges. 5. If they pass, simply turn their group back to 1. Doing those will effectively mimic what your asking without the need to edit the src. And it is quite simple, it'll only take up a maximum of 15 additional lines. That's pure cake. However, I don't see a problem with such a command being added, it's just your reasoning is invalid. Perhaps if you could give us other examples, where using my work-around method wouldn't be practical than maybe it would be a benefit to rA as a whole. Not just a way to make 2-3scripts better.
  5. Nice release, this can be incredibly useful. Especially for the exact purpose you've said lol. @off topic - I didn't even know about that folder... this definitely makes adding custom things easier, provided all src can be added in a similar manner.
  6. Hey Emistry, just wanna say, you've done good. There are a lot of great scripts here. So in return I just wanted to say thank you, and also, you have a " small " typo in your E-Inquiry script. set .@Select,select(( .@Title$ == "" )?"[ ^FF0000Incomplete^000000 ] Title":"[ ^0000FFCompleted^000000 ] Title", ( .@Message$ == "" )?"[ ^FF0000Incomplete^000000 ] Message":"[^0000FFCompleted^000000 ] Title", You'll notice here that ( at line 91 ) you have Completed Title twice, where it should say Message. Keep up the good work. Also, this is just a suggestion to improve your E-Inquiry script. During this process of creating the message: Case 2: mes "Briefly explain what's your Problem."; set .@i,0; do{ input getd(".@Message"+.@i+"$"); set .@Message$,.@Message$ + getd(".@Message"+.@i+"$")+" "; set .@Continue,select("Complete:Continue Messages"); }while( .@Continue == 2 ); break; You should change it to this: Case 2: mes "Briefly explain what's your Problem."; set .@i,0; do{ input getd(".@Message"+.@i+"$"); set .@Message$,.@Message$ + getd(".@Message"+.@i+"$")+" "; next; mes "^00FF00____________________________^000000"; mes "^FF0000Title^000000 : "+.@Title$; mes "^00FF00____________________________^000000"; mes "^FF0000Messages^000000 : "+.@Message$; mes "^00FF00____________________________^000000"; set .@Continue,select("Complete:Continue Messages"); }while( .@Continue == 2 ); break; So that, after updating the message the player is able to see the changes before sending it. Keep in mind this suggestion is not needed, but would be an over all improvement to an already great script.
  7. Well firstly, if you give this command to your players then that is completely your fault. Personally, I believe that this sort of command and those like it fall strictly under the GM only commands.
  8. Hmm, then perhaps a work around is in need. We'll do something to replace the sleep timer, while still keeping the original script's purpose in tact... give me a few mins and I'll write something up. Edit: Okay, here is my revisions to your script... - script LOGIN -1,{ OnPCLoginEvent: addtimer( 1000+.Rest*60000,strnpcinfo(3)+"::OnRewardTime"; setd ".Temp"+ getcharid(0) +"",(#LastDailyReward + .MinWait); //Saves your wait time for use in the loop. freeloop 1; //Needed to do this... while(1) {if( getd(".Temp"+ getcharid(0) +"") < (#LastDailyReward + .MinWait) ){break;}//Checks to see if you got the reward, then ends the loop. Thus ending the script. if( checkidle >= (5*60) ){addtimercount( (checkidle*1000) - @lastidle,strnpcinfo(3)+"::OnRewardTime" ); set @lastidle,@lastidle+(checkidle*1000);}} //Checks to see if you've been idle for atleast 5mins, if so, then adds 5mins to the countdown timer. Meaning the player will essentially have to play for X amount of time to get reward, all idled time will not count and instead delay the timer. freeloop 0; end; OnWhisperGlobal: OnLoginCmnd: OnRewardTime: set .@i,(gettime(7)*365*24)+(gettime(8)*24)+gettime(3); set .@g,getarraysize(.Rewards); if(checkvending() > 0) {dispbottom "You seem to be vending, you cannot claim a daily prize until you stop and relogin."; end; } if(.@i >= (#LastDailyReward + .MinWait)){ if(.@i < #LastDailyReward + .MaxWait){ set #DRewardCon,#DRewardCon+1; } else { set #DRewardCon,1; } if(#DRewardCon*2 > .@g-1){ set .@p,.Rewards[.@g-2]; set .@q,.Rewards[.@g-1]; } else { set .@p,.Rewards[#DRewardCon*2-2]; set .@q,.Rewards[#DRewardCon*2-1]; } if(.Mode&1&&.@p && checkvending() == 0) { if(!checkweight(.@p,.@q)){ dispbottom "You seem to be oveweight, put some stuff away and relog to claim prize"; end; } else { getitem .@p,.@q; dispbottom ""+.@q+" "+getitemname(.@p)+""; } } if(.Mode&2) set .@A,#DRewardCon*.ZMulti; if(.Mode&8) set .@A,.@A+.@q; if(.Mode&2||.Mode&8){ setd .PointType$,getd(.PointType$)+.@A; dispbottom ""+.@A+" "+.PointType$+""; } if(.Mode&4){ set .@B,#DRewardCon*.XPMulti[0]; set .@C,#DRewardCon*.XPMulti[1]; } if(.Mode&16){ set .@B,.@B+.@q; set .@C,.@C+.@q; } if(.Mode&4||.Mode&16){ getexp .@B,.@C; } if(.Mode&32){ for(set .@x,0; .@x < getarraysize(.BuffInfo); set .@x,.@x+4){ if(#DRewardCon % .BuffInfo[.@x+1] == 0) sc_start .BuffInfo[.@x], .BuffInfo[.@x+2]*60000, .BuffInfo[.@x+3]; } } dispbottom "You have collected your daily reward, for "+#DRewardCon+" day"+((DRewardCon>1)?"s":"")+" in a row."; set #LastDailyReward,.@i; } else { dispbottom "You have "+(#LastDailyReward + .MinWait-.@i)+" hours till your next reward"; } end; In side the script I left comments for you to follow, but I'll explain what this script does here. While I did not touch the core of the script, I did change the timing calc for it. Instead of having the script sleep for X time, I added a timer, that will trigger after that time has ended. This is becaue a player must be online for X amount of time to get the reward, and only after the reward cooldown is finished, atleast that is what I can gather from the original script. What I did was add in a check for Idle players, meaning those sitting in chat boxes, or just straight afking won't get the reward until they move around for the duration of the timer. This also applies to @autotraders. In short this is what the script does.... 1. Adds a 2hour timer (example time). 2. After 2 hours my timer will trigger an event giving me the reward, if my reward cool down is up. 3. If I idle (stand still) for more than 5mins. It will Add my idle time to the timer, thus extending it. And will continue to add this time, until I move around. 4. Once I move around again, the timer will countdown again. 5. After which if I don't idle, it will proceed to #2. Else it will proceed to #3 if I idle for more than 5mins. How does this stop @autotraders? Simple, when a player uses @autotrade, their character is still logged into the server, there for they can still go idle. And since player's can't move @autotraders until they relog, their timer will continously go up and up and up until the relog, which will reset the timer again. Since this same rule can apply to venders it's effective on them as well. It is also effective on ChatBox users and afkers who just up and leave.
  9. It should return the ' real ' unique name, because when used with an npc named: test it strnpcinfo(3) would show test, the same as strnpcinfo(0). This is to say, that if there is ANY hidden information regarding the npc's naming, it should detect it. This should hold true for NPCs that have been renamed by the server due to duplicate names.
  10. Oh my bad, I thought that was it's intention... an easy fix.... Edit: I edited my first post to add it to the second slot. It can be edited to work for all 4 slots, but keep in mind that as this uses a PERM-Char variable, there is no real way to make it work universally without extensive consideration on how this will be used. What I made is only a temporary work around until you can find a better means to get what you want.
  11. for ( set .@i,0; .@i < getarraysize(.restrictedMap$); set .@i, .@i + 1 ) if(strcharinfo(3) == .restrictedMaps$[.@i]) end; Change INTO for ( set .@i,0; .@i < getarraysize(.restrictedMaps$); set .@i, .@i + 1 ) if(strcharinfo(3) == .restrictedMaps$[.@i]) end; The problem was you were missing an ' S ' which made the loop useless. Though this shouldn't REALLY matter since, it would set the loop to 0 and end, making .@i = 0.
  12. Well, for troubleshootings sake, instead of instance_npcname(strnpcinfo(0))+"::OnKill"; USE instance_npcname(strnpcinfo(3))+"::OnKill"; I say this, because I can't reproduce your problem. I was just testing a similar feature involving a monster Event label in an instance and it worked fine. Although I must say that, I do not specify instance_npcname( strnpcinfo(3) ), I actually type out the full npc name. This has resulted with 0 errors.
  13. 4729,Dexterity10,DEX+10,6,20,,10,,,,,,,,16,,,,,{ if( !TF_H ){callfunc("Hiding",4729);} skill "TF_HIDING",1; },{},{} //callfunc("func_name",itemID); That is for the item itself. function script Hiding { getinventorylist; set @i,1; for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {if( getitemslots(@inventorylist_id[.@i] && !@inventorylist_card2[.@i] && !@inventorylist_card3[.@i] && !@inventorylist_card4[.@i] && !@inventorylist_expire[.@i] && !@inventorylist_attribute[.@i]) //Because some gear has 4slots. Also not sure if Rental Items can have slots (poor scripting?) Also the item is not broken (Pretty sure this is how normal cards function). {set .@menu$,.@menu$ + getitemname(@inventorylist_id[.@i]) +":"; set .@menu[@i],.@i; set @i,@i+1;} }//Saving Menu for later use menu .@menu$,-; set .@j,getd(".@menu["+@menu+"]"); delitem2(@inventorylist_id[.@j],1,1,@inventorylist_refine[.@j],0,0,0,0,0); getitem2(@inventorylist_id[.@j],1,1,@inventorylist_refine[.@j],0,@inventorylist_card1[.@j],getarg(0),0,0); set TF_H,1; end; } And that is the script used to make it act like a card. It's not totally refined, but it should work. *Note - This will only work for items that don't have any cards in it.* *Note - This will also only work once per item, in this case, once for this particular item*
  14. It may be that @autoloot doesn't put the player in a vending state seen by the server. So for your case this is what you can do. if( checkvending() || checkidle == ( 120 * 60 ) ){dispbottom "You seem to be vending. You cannot claim a daily prize until you stop and relogin."; end;} That will check to see if they've been idle for 2hours. Though, this isn't full proof, because I can essentially log in walk around for 2seconds and then @autotrade, thus making the 2hour check invalid. This will only work with those who login and don't move from that spot at all. Unless we get more information regarding how @autoloot players are seen by the server, this may be your best solution.
  15. I believe those were removed officially in light of the new Yoyo and Nightmare PvP modes.
  16. Will activate every hour on the hour. OnMinute00: do this; end; Will Activate every hour at XX:30 OnMinute30: do this; end; If your trying to make it start every X amount of hours, but don't want to use alot of labels, than, you can do what you did, however, keep in mind that the calculations only return remainders, and well, you can get same remainders unintentionally. So to play it safe you can do this: - script events -1,{ OnInit: //We Skip 0 because it's not needed in this case, you'll see why later. //Put the sub labels that start the event here. Ex: "NpcName::OnMyEventStart" setarray .events$[1],"NPC1::OnEvent1","NPC2::OnEvent2","NPC3::OnEvent3"; end; OnMinute00: set .Hour,.Hour+1;{ if( .Hour == getarraysize(.events$) ){set .Hour,1;} } donpcevent .events$[.Hour] end; } This way you can use 1 Script to activate all your Event NPCs. This will also allow your to have events start every X amount of hours. Though, it WOULD be simpler to just use OnClock labels, to start certain events. Because this can only go so far, before it becomes obsolete.
  17. Well currently it's not implemented, however, seeing as how it's been nearly 3months since kRO's release, and Hercules has done most if not all of the leg work, I don't see why we couldn't or shouldn't add this in. I for one would like this added in asap.
  18. That will work as well. I forgot those commands are there >.>;
  19. GmOcean

    MvP invasion

    - script mvpinis -1,{ OnInit: setarray .Map$[0],"prontera","morocc","geffen","payon","alberta","aldebaran","xmas","comodo","yuno","amatsu","gonryun","umbala","louyang","ayothaya","eibroch","hugel","rachel","veins","moscovia"; setarray .MVP[0],1511,1785,1630,2320,1039,1272,1719,1389,1115,1418,1252,1086,1885,1492,1734,1251,1688,2156,1373,1147,1087,1190,1038,1157,1159,1623,1583,1312,1685,1658; end; OnMinute00: .event_timer++; if( .event_timer % 8 == 0 ) end; killmonster .Map$[ .RandMap ],"All"; set .RandMap,rand( getarraysize( .Map$ ) ); for(set .@i,0; .@i<getarraysize(.MVP) set .@i,.@i+1){ monster .Map$[ .RandMap ],0,0,"MVP Event",.MVP[ .@i ],1,strnpcinfo(0)+"::OnKilled"; } announce "Invasion MvP : "+getmonsterinfo( .MVP[ .RandMVP ],0 )+" han invadido "+.Map$[ .RandMap ]+" .",0; end; OnKilled: announce "Evento MvP : Todos los MvP han sido cazados",0; set mvp_point, mvp_point + 1;// +1 mvp point end; }
  20. Hmm, I'm not sure if the new 2013 clients or late 2012 clients are as you say, I just know that in the past it was all hard coded, this included animations as well as IDs. I still think this may be the case, as currently the src code merely sends a packet to the client which then produces said effect. I say this because if it was the case where you could just replace a file ( in this case most likely tga file ) then there would be far more customizations our there. Though it still may be possible since, there are cases of people changing StormGust animation. And that is an option in @effect. I guess at this point we both need someone who deals with the client on a regular basis to clarify this and give proper insight.
  21. This currently isn't possible as the effects in @effects are hard-coded into the client.exe. Therefore adding new ones or replacing existing just isn't possible. The only realistic approach to this would be to have a custom client.exe with a plugin hooked at that location to allow for extra effects to be added via an external file. But none of the client projects have come close to this yet.
  22. - script npcname -1,{ OnInit: //Mob ID, Amt, Mob ID2, Amt2, etc... set .level0[0],1002,1,1002,1,1002,1; set .level1[0],1003,1,1003,1,1003,1; set .level2[0],1004,1,1004,1,1004,1; set .level3[0],1005,1,1005,1,1005,1; set .level4[0],1006,1,1006,1,1006,1; //Add more Levels as needed. end; OnPCLoginEvent: iSummon: for(set .@i,0; .@i< getarraysize( getd(".level"+ @count +"") ); set .@i,.@i+2) {monster strcharinfo(3),-1,-1,getmonsterinfo( getd(".level"+ @count +"["+ .@i +"]"),0), getd(".level"+ @count +"["+.@i+"]"), getd(".level"+ @count +"["+ (.@i + 1)+"]"),strnpcinfo(3)+"::OnThisMobDead";} end; OnThisMobDead: set @mkill,@mkill + 1; if( @mkill >= ( getarraysize( getd(".level"+ @count +"") ) / 2 ) ){set @count, @count +1;} if( getd(".level"+ @count +"[0]") == 0 ){end;} //Completed all rounds. goto iSummon; end; That should do what you ask assuming I understood your request. Right now it should start a soon as a player logs in. Additionally, it'll allow for support past 5 levels, as well as alot of monsters.
  23. if( compare(strcharinfo(0),"PRE") ){ do this } else { end; } However, this will only check to see if they have those 3 letters in there name. To check to see if they are the FIRST 3 letters we need to do this: if( charat( strcharinfo(0), 0 ) == "P" && charat( strcharinfo(0), 1 ) == "R" && charat( strcharinfo(0), 2 ) == "E" ){ do this } else { end; } The above will check to see if the FIRST 3 letters of the players name is PRE. Keep in mind though, it is checking for Case Sensitive PRE. There is a way to bypass that, but I didn't put that in since your looking for PRE specifically.
  24. @Emistry - That only gives them the items if they are online. The request is for offline as well, otherwise couldn't your script be reduced to this: function script Guild_Reward { addrid(3); getitem 501,1; getitem 502,1; getitem 503,3; end; } Because my understanding is, addrid will only attach those who are online. So, to make this work with offline, we'd need to store it in the player's storage. if( isloggedin ){ do this } else { query_sql("INSERT INTO `storage` (`account_id`,`name_id`,`amount`) VALUES ('"+.@aid[.@i]+"','501','1')"); } Not sure if that's written right, but you get the idea. (Haven't been to good with sql lol hate it @.@)
×
×
  • Create New...