Jump to content

Emistry

Forum Moderator
  • Posts

    10015
  • Joined

  • Days Won

    396

Everything posted by Emistry

  1. Well...actually he is looking for a NPC with Countdown Chatroom title above the NPC when the users has entered the room... prontera,155,181,5 script Sample 757,{ if( getmapusers( .Map$ ) ){ npctalk "You cant go in right now. There is someone inside."; }else{ announce "["+strcharinfo(0)+"] entered Gold Room.",0; warp .Map$,0,0; initnpctimer; } end; OnInit: set .Map$,"guild_vs5"; monster .Map$,0,0,"Gold",1002,100,strnpcinfo(0)+"::OnMobKill"; while( 1 ){ delwaitingroom; if( getmapusers( .Map$ ) ){ waitingroom "Countdown "+( 60 - ( getnpctimer(0) / 1000 ) )+" Seconds",0; } sleep 1000; } end; OnMobKill: getitem 969,1; monster .Map$,0,0,"Gold",1002,1,strnpcinfo(0)+"::OnMobKill"; end; OnTimer60000: mapannounce .Map$,"Time's Up !! You will be warped out right now..",0; mapwarp .Map$,"prontera",155,181; end; }
  2. Emistry

    This or That?

    Ice Cream Coke or Milk
  3. Emistry

    This or That?

    Google Online Game or Offline Game
  4. Emistry

    This or That?

    Sleep Clone or Duplicate
  5. Welcome back....enjoy your tour at rAthena..xD
  6. Please make sure you already have the NPC with selected Name...before you try to duplicate it......
  7. That doesnt even need any scripting skills.....just find the typo...beside the typo has been "shown" in the map server using quotation marks..... it is depend on you....
  8. ..just wondering....you dont even know how to solve a simple typo error ??? change into this setarray .Map$[0],"prontera","payon","alberta","aldebaran";
  9. You have to Click on the Patch File only it will appear..... then select your desired SVN Folder and Patch it then....
  10. Emistry

    Array

    Well..i guess you can try something like this... setarray .EquipID,2764, 23005,23006,23007; for( set .@i,0; .@i < getarraysize( .EquipID ); set .@i,.@i + 1 ){ if( isequipped( .EquipID[.@i] ) set .@Equipped,.@Equipped + 1; } specialeffect2 EF_BUBBLE; set .@fcast,20 - ( 2 * .@Equipped ); in this case...i reduce the Cast time by 2 seconds for every Equipments he wear...
  11. Sorry my mistake... change both to this one announce "["+strcharinfo(0)+"] entered Gold Room.",0; ... ... mapannounce .Map$,"Time's Up !! You will be warped out right now..",0; Anyway...next time...please try to figure out why it didnt work / nothing happen.... Make sure you check Map Server for any possibility of Error or else....
  12. Take a look at here ?? http://rathena.org/board/topic/56229-can-not-carry-more-than-30000-of-one-kind-item/
  13. Ops... should be this set Manner,0; for multi map...erm..you can try this - script Sample -1,{ OnPCLoadMapEvent: for( set .@i,0; .@i < getarraysize( .Map$ ); set .@i,.@i + 1 ){ if( strcharinfo(3) == .Map$[.@i] && Manner >= 0 ){ sc_start SC_NOCHAT,-1,0; dispbottom "Chatting is Disabled within PVP Maps."; end; } } if( Manner >= 0 ){ sc_end SC_NOCHAT; set Manner,0; } end; OnInit: setarray .Map$[0],"prontera","payon","alberta","aldebaran"; for( set .@i,0; .@i < getarraysize( .Map$ ); set .@i,.@i + 1 ) setmapflag .Map$[.@i],mf_loadevent; end; }
  14. try this prontera,155,181,5 script Sample 757,{ if( getmapusers( .Map$ ) ){ npctalk "You cant go in right now. There is someone inside."; }else{ announce "["+strcharinfo(0)+"] entered Gold Room."; warp .Map$,0,0; initnpctimer; } end; OnInit: set .Map$,"guild_vs5"; monster .Map$,0,0,"Gold",1002,100,strnpcinfo(0)+"::OnMobKill"; end; OnMobKill: getitem 969,1; monster .Map$,0,0,"Gold",1002,1,strnpcinfo(0)+"::OnMobKill"; end; OnTimer60000: mapannounce .Map$,"Time's Up !! You will be warped out right now.."; mapwarp .Map$,"prontera",155,181; end; }
  15. Perhaps you should show us the Error Message as well....
  16. bonus2 bAddRace,RC_DemiHuman,10; bonus2 bSubRace,RC_DemiHuman,10; Check here for more Item Bonus Script : Doc/Item_Bonus.txt
  17. the rand( 300 ) just a command for the server to generate a number randomly between 0 ~ 300 ( you specified 300 in this case ) if you put rand( 1000 ) then it will generate randomly between 0 ~ 1000 Wiki : Rand *rand(<number>{,<number>}); This function returns a number ... (if you specify one) ... randomly positioned between 0 and the number you specify -1. (if you specify two) ... randomly positioned between the two numbers you specify. rand(10) would result in 0,1,2,3,4,5,6,7,8 or 9 rand(0,9) would result in 0,1,2,3,4,5,6,7,8 or 9 rand(2,5) would result in 2,3,4 or 5 Do you really know/understand what does a IF-ELSE Statement does ????? if( Contition = True ) { All Process is here if Condition True... }else{ All process goes here when Condition is not Matched / False } Example from Doc : *if (<condition>) <statement>; This is the basic conditional statement command, and just about the only one available in this scripting language. The condition can be any expression. All expressions resulting in a non-zero value will be considered True, including negative values. All expressions resulting in a zero are false. If the expression results in True, the statement will be executed. If it isn't true, nothing happens and we move on to the next line of the script. if (1) mes "This will always print."; if (0) mes "And this will never print."; if (5) mes "This will also always print."; if (-1) mes "Funny as it is, this will also print just fine."; For more information on conditional operators see the operators section above. Anything that is returned by a function can be used in a condition check without bothering to store it in a specific variable: if (strcharinfo(0)=="Daniel Jackson") mes "It is true, you are Daniel!"; More examples of using the 'if' command in the real world: Example 1: set @var1,1; input @var2; if(@var1==@var2) goto L_Same; mes "Sorry that is wrong"; close; L_Same: close; Example 2: set @var1,1; input @var2; if(@var1!=@var2) mes "Sorry that is wrong"; close; (Notice examples 1 and 2 have the same effect.) Example 3: set @var1,@var1+1; mes "[Forgetfull Man]"; if (@var==1) mes "This is the first time you have talked to me"; if (@var==2) mes "This is the second time you have talked to me"; if (@var==3) mes "This is the third time you have talked to me"; if (@var==4) mes "This is the forth time you have talked to me, but I think I am getting amnesia, I have forgotten about you"; if (@var==4) set @var,0; close; Example 4: mes "[Quest Person]"; if(countitem(512)>=1) goto L_GiveApple; // The number 512 was found from item_db, it is the item number for the Apple. mes "Can you please bring me an apple?"; close; L_GiveApple: mes "Oh an apple, I didn't want it, I just wanted to see one"; close; Example 5: mes "[Person Checker]"; if($name$!=null) goto L_Check; mes "Please tell me someones name"; next; input $name$; set $name2$,strcharinfo(0); mes "[Person Checker]"; mes "Thank you"; L_Check: if($name$==strcharinfo(0) ) goto L_SameName; mes "[Person Checker]"; mes "You are not the person that " +$name2$+ " mentioned"; L_End: set $name$,null; set $name2$,null; close; L_SameName: mes "[Person Checker]"; mes "You are the person that " +$name2$+ " just mentioned"; mes "nice to meet you"; goto L_End; See 'strcharinfo' for explanation of what this function does. Example 6: Using complex conditions. mes "[Multi Checker]"; if( (@queststarted==1) && (countitem(512)>=5) ) goto L_MultiCheck; // Only if the quest has been started AND You have 5 apples will it goto "L_MultiCheck" mes "Please get me 5 apples"; set @queststarted,1; close; L_MultiCheck: mes "[Multi Checker]"; mes "Well done you have started the quest of got me 5 apples"; mes "Thank you"; set @queststarted,0; delitem 512,5; close; With the Advanced scripting engine, we got nested if's. That is: if (<condition>) dothis; else dothat; If the condition doesn't meet, it'll do the action following the else. We can also group several actions depending on a condition, the following way: if (<condition) { dothis1; dothis2; dothis3; } else { dothat1; dothat2; dothat3; dothat4; } Remember that if you plan to do several actions upon the condition being false, and you forget to use the curly braces (the { } ), the second action will be executed regardless the output of the condition, unless of course, you stop the execution of the script if the condition is true (that is, in the first grouping using a return; , and end; or a close; ) Also, you can have multiple conditions nested or chained, and don't worry about limits as to how many nested if you can have, there is no spoon ... if (<condition 1>) dothis; else if (<condition 2>) { dotheother; do that; end; } else do this; ... In above case....the IF-ELSE Statement check for 2 Condition before the following process if carried out.... When the rand(300) generated a Number inside the range of 101 ~ 149 ... the Condition is TRUE...coz it is Bigger than 100 and it is Smaller than 150 On the other hand..... between 101 ~ 149 there are about 49 numbers ........ which mean... the rate is.. 49 / 300
  18. this only disable the ChatRoom creation in the particular maps... it doenst block members within a party/guild to chatting..... Anyway..i found a solution for you to disable Chat within Players... try this scripts... - script Sample -1,{ OnPCLoadMapEvent: if( strcharinfo(3) == "mapname" && Manner >= 0 ){ sc_start SC_NOCHAT,-1,0; dispbottom "Chatting is Disabled within PVP Maps."; }else if( strcharinfo(3) != "mapname" && Manner >= 0 ){ sc_end SC_NOCHAT; set Manner 0; } end; } mapname mapflag loadevent Change the MapName to your PVP Map
  19. I was wondering some part of your script might configure wrongly or mistake ?? For Example : if(healed==1) { message strcharinfo(0),"You healed!"; end; } set healed,1; Why check for Variable named "healed" for dispay the Message? isnt that quite useless ? coz..it is still healing your character..... attachrid(0); i guess....the attachrid is useless rite here...since you didnt attach it to a valid account ID... pvp_n_1-1,102,182,6 script BattlePortal 45,3,3,{ erm...if you are using a "Portal" like NPC... you required a "OnTouch" Label to make use of it..... otherwise...players still have to click on the NPC to get access to the script parts.. ( Sprite #45 perhaps is not Accessable by Clicking if it does Exists ) Perhaps there cant receive the Prize/ Items next time... ? coz you didnt Remove the Variable for Future Item gaining... i only found 2 of the variable access here.. Anyway...just some personal comment on these..hope it did help to improve your script.. and..if anything i was miss / wrong...please let me know.. >.<
  20. Just a Simple Calculation... 60 Seconds * 60 Minute * 24 Hours * 2 Days.. 60 * 60 * 24 * 2 = 172800 Sorry it is in Seconds..i missed that part.. *rentitem <item id>,<time>; *rentitem "<item name>",<time>; Creates a rental item in the attached character's inventory. The item will expire in <time> seconds and be automatically deleted. When receiving a rental item, the character will receive a message in their chat window. The character will also receive warning messages in their chat window before the item disappears. This command can not be used to rent stackable items. Rental items cannot be dropped, traded, sold to NPCs, or placed in guild storage. (i.e. trade mask 75) Note: 'delitem' in an NPC script can still remove rental items.
  21. You didnt close it... is should be this... setarray .Item[0], 25000,100; next time..show the MapServer Error as well if possible.....
  22. Just a Simple Calculation... 60 Seconds * 60 Minute * 24 Hours * 2 Days.. 60 * 60 * 24 * 2 = 172800 *rentitem <item id>,<time>; *rentitem "<item name>",<time>; Creates a rental item in the attached character's inventory. The item will expire in <time> seconds and be automatically deleted. When receiving a rental item, the character will receive a message in their chat window. The character will also receive warning messages in their chat window before the item disappears. This command can not be used to rent stackable items. Rental items cannot be dropped, traded, sold to NPCs, or placed in guild storage. (i.e. trade mask 75) Note: 'delitem' in an NPC script can still remove rental items.
  23. Cant View NPC ?? did you load the NPC ? ( Perhaps you have Disabled All of Them ? ) You can view yourself..but cant view other player ? did you allowed other to join your server ??
×
×
  • Create New...