Jump to content

Mabuhay

Content Moderator
  • Content Count

    442
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

  • Days Won

    25

Everything posted by Mabuhay

  1. // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0], "#CASHPOINTS", "Cash Points";
  2. Should be used as robe. not headgear.
  3. are you running windows 10? If yes, check the packetver of your server files. Change it to the client date. Happened to me the first time I installed rathena on my laptop.
  4. VP accounts are by default group_id 5 (if I am not mistaken) found in login table. Not tested. - script VIP_Checker -1,{ OnCheck: if(!([email protected] = query_sql(SELECT `account_id` FROM `login` WHERE `group_id` = '5'", [email protected]))) { dispbottom "No data found."; end; } dispbottom "VIP Account ID list :"; for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) dispbottom ([email protected]+1) +". Account ID : "+ [email protected][[email protected]]; dispbottom "Total of "[email protected] +" Active VIP account(s)."; end; OnInit: bindatcmd "checkvip", strnpcinfo(0)+"::OnCheck", 60, 60; // @checkvip to list active vip accounts }
  5. *getlook(<type>{,<char_id>}) This function will return the number for the current character look value specified by type. See 'setlook' for valid look types. This can be used to make a certain script behave differently for characters dressed in black. @var = getlook(LOCATION); Try using setlook instead of changelook
  6. store the original looks to a temporary character var then set it again when player finishes fishing
  7. Hi, I was wondering if there are any available 'furniture sprites' here? Something like tables, chairs, or something alike. TIA
  8. I understand you need copies of the map. But I hope you also understand how instance script works. It is basically the thing you'll need to work with... As I told you, everything you'll need to know is found on the script sample and if you want to expand more knowledge, check your doc/script_commands.txt and proceed to instancing part.. If you still don't understand, try posting on script request section in the forum and wait for someone who might be able to give you what you need instead of learning how to make a proper instance script.. EDIT: While I was lurking at rathena's git. I found this : https://github.com/rathena/rathena/pull/5112 Not sure if already stable or ready for use but you can try it yourself.
  9. There should be an error. Its a waste of time to guess the problem.
  10. If you only read the script carefully, you should be able to do make as much duplicates as you want without duplicating the whole script. // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ prt_in,32,114,5 script Tier 1 Quest#1 998,{ callfunc "qshop"; } If you want the npc to load only SHOP ID 1, you should do something like : map,x,y,f script Tier 1 Quest#1 998,{ callfunc "qshop", 1; } // Shows SHOP ID 1 only Then for more examples: map,x,y,f script Tier 2 Quest#1 998,{ callfunc "qshop", 1, 2; } // Shows SHOP ID 1 and 2 map,x,y,f script Tier 3 Quest#1 998,{ callfunc "qshop", 1, 3; } // Shows SHOP ID 1 and 3 ..... And so on...
  11. getmapxy(@mapname$,@mapx,@mapy,0) -> getmapxy(@mapname$,@mapx,@mapy,BL_PC)
  12. I already sent you the visual instruction how to determine.. Please read it.
  13. Execute this script command (Samples on how to use it is provided) (Source : doc/script_commands.txt). *getpartymember <party id>{,<type>{,<array_variable>}}; This command will find all members of a specified party and returns their names (or character id or account id depending on the value of "type") into an array of temporary global variables. There's actually quite a few commands like this which will fill a special variable with data upon execution and not do anything else. Upon executing this, [email protected]$[] is a global temporary string array which contains all the names of these party members (only set when type is 0 or not specified) [email protected][] is a global temporary number array which contains the character id of these party members. (only set when type is 1) [email protected][] is a global temporary number array which contains the account id of these party members. (only set when type is 2) [email protected] is the number of party members that were found. The party members will (apparently) be found regardless of whether they are online or offline. Note that the names come in no particular order. Be sure to use [email protected] to go through this array, and not 'getarraysize', because it is not cleared between runs of 'getpartymember'. If someone with 7 party members invokes this script, the array would have 7 elements. But if another person calls up the NPC, and he has a party of 5, the server will not clear the array for you, overwriting the values instead. So in addition to returning the 5 member names, the 6th and 7th elements from the last call remain, and you will get 5+2 members, of which the last 2 don't belong to the new guy's party. [email protected] will always contain the correct number, (5) unlike 'getarraysize()' which will return 7 in this case. If 'array_variable' is set, the result will be stored to that variable instead using global variable. Example 1: list party member names // get the party member names getpartymember getcharid(1),0; // It's a good idea to copy the global temporary [email protected]***** // variables to your own scope variables because if you have pauses in this // script (sleep, sleep2, next, close2, input, menu, select, or prompt), // another player could click this NPC, trigger 'getpartymember', and // overwrite the [email protected]***** variables. [email protected] = [email protected]; copyarray [email protected]$[0], [email protected]$[0], [email protected]; // list the party member names for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) mes ([email protected] +1) + ". ^0000FF" + [email protected]$[[email protected]] + "^000000"; close; Example 2: check party count (with a 'next' pause), before warping to event .register_num = 5; // How many party members are required? // get the charID and accountID of character's party members getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; if ( [email protected] != .register_num ) { mes "Please form a party of " + .register_num + " to continue"; close; } // loop through both and use 'isloggedin' to count online party members for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]] ) ) [email protected]_online++; // We search accountID & charID because a single party can have multiple // characters from the same account. Without searching through the charID, // if a player has 2 characters from the same account inside the party but // only 1 char online, it would count their online char twice. if ( [email protected]_online != .register_num ) { mes "All your party members must be online to continue"; close; } // copy the array to prevent players cheating the system copyarray [email protected], [email protected], .register_num; mes "Are you ready ?"; next; // careful here select("Yes"); // When a script hits a next, menu, sleep or input that pauses the script, // players can invite or /leave and make changes in their party. To prevent // this, we call getpartymember again and compare with the original values. getpartymember getcharid(1), 1; if ( [email protected] != .register_num ) { mes "You've made changes to your party !"; close; } for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { if ( [email protected][[email protected]] != [email protected][[email protected]] ) { mes "You've made changes to your party !"; close; } } // Finally, it's safe to start the event! warpparty "event_map", 0,0, getcharid(1); Count the players on the party. Store into temp variable (or not if you prefer to) Add the arguments That should be it.
  14. Why are you doing that? --------------------------------------- *vip_status(<type>,{"<character name>"}) Returns various information about a player's VIP status. Valid types: VIP_STATUS_ACTIVE - VIP status: true if the player is a VIP or false if not VIP_STATUS_EXPIRE - VIP expire timestamp if the player is VIP or 0 if not VIP_STATUS_REMAINING - VIP time remaining in seconds NOTE: This command is only available if the VIP System is enabled. --------------------------------------- *vip_time <time>,{"<character name>"}; Changes a player's VIP time (in minutes). A positive value will increase time, and a negative value will decrease time. NOTE: This command is only available if the VIP System is enabled. --------------------------------------- Use these script commands.
  15. Change all char-bound variables to account-bound. Variables --------- The meat of every programming language is variables - places where you store data. In the rAthena scripting language, variable names are not case sensitive. Variables are divided into and uniquely identified by the combination of: prefix - determines the scope and extent (or lifetime) of the variable name - an identifier consisting of '_' and alphanumeric characters postfix - determines the type of the variable: integer or string Scope can be: global - global to all servers local - local to the server account - attached to the account of the character identified by RID character - attached to the character identified by RID npc - attached to the NPC scope - attached to the scope of the instance Extent can be: permanent - They still exist when the server resets. temporary - They cease to exist when the server resets. Prefix: scope and extent nothing - A permanent variable attached to the character, the default variable type. They are stored by char-server in the `char_reg_num` and `char_reg_str`. "@" - A temporary variable attached to the character. SVN versions before 2094 revision and RC5 version will also treat 'l' as a temporary variable prefix, so beware of having variable names starting with 'l' if you want full backward compatibility. "$" - A global permanent variable. They are stored by map-server in database table `mapreg`. "[email protected]" - A global temporary variable. This is important for scripts which are called with no RID attached, that is, not triggered by a specific character object. "." - A NPC variable. They exist in the NPC and disappear when the server restarts or the NPC is reloaded. Can be accessed from inside the NPC or by calling 'getvariableofnpc'. Function objects can also have .variables which are accessible from inside the function, however 'getvariableofnpc' does NOT work on function objects. "[email protected]" - A scope variable. They are unique to the instance and scope. Each instance has its own scope that ends when the script ends. Calling a function with callsub/callfunc starts a new scope, returning from the function ends it. When a scope ends, its variables are converted to values ('return [email protected];' returns a value, not a reference). "'" - An instance variable. These are used with the instancing system and are unique to each instance type. Can be accessed from inside the instance or by calling 'getvariableofinstance'. "#" - A permanent local account variable. They are stored by char-server in the `acc_reg_num` table and `acc_reg_str`. "##" - A permanent global account variable stored by the login server. They are stored in the `global_acc_reg_num` table and `global_acc_reg_str`. The only difference you will note from normal # variables is when you have multiple char-servers connected to the same login server. The # variables are unique to each char-server, while the ## variables are shared by all these char-servers. Postfix: integer or string nothing - integer variable, can store positive and negative numbers, but only whole numbers (so don't expect to do any fractional math) '$' - string variable, can store text Examples: name - permanent character integer variable name$ - permanent character string variable @name - temporary character integer variable @name$ - temporary character string variable $name - permanent global integer variable $name$ - permanent global string variable [email protected] - temporary global integer variable [email protected]$ - temporary global string variable .name - NPC integer variable .name$ - NPC string variable [email protected] - scope integer variable [email protected]$ - scope string variable 'name - instance integer variable 'name$ - instance string variable #name - permanent local account integer variable #name$ - permanent local account string variable ##name - permanent global account integer variable ##name$ - permanent global account string variable
  16. Use `OnInstanceInit` instead of `OnInit`
  17. https://rathena.org/board/topic/122835-gstorage-isnt-working/#comment-373841
  18. that script sample is exactly how you make instanced map. Try to learn how to use it. It is pretty much straight forward to understand. Goodluck!
  19. Im assuming that you are using old server files. Check your own doc/sample/instancing.txt
  20. You can start learning how to instance here: https://github.com/rathena/rathena/blob/master/doc/sample/instancing.txt
  21. Try using these for 2018-06-21 client OngoingQuestInfoList.lub RecommendedQuestInfoList.lub
  22. Thats the idea of instancing. You are using live duplicated maps.
  23. Here are the options I suggest you do : Make duplicate of the guard NPC. Dont make the NPC A interact while guard NPC is still with another player. Put the player on an instance (unnecessary and complicated) Duplicate Maps and NPC (just like the default ones when spawning in-game for the first time - unnecessary also) 3 and 4 obviously are out of question but Im still giving you the option. 1 and 2 are your best options.
  24. Here is a better thing to do for your script. I made one myself instead of editing yours.. Anyways, I think you can understand this very clearly.. prontera,150,150,0 script NPC A 100,{ mes "Test.."; close2; if ( done_walking ) end; // trigger only once, cannot be triggered twice per character.. donpcevent "NPC B::OnNPCWalk"; sleep2 1000; // 1 sec delay before player walks unitwalk getcharid(3), 160, 158; done_walking = true; // sets done walking here.. end; } prontera,150,152,0 script NPC B 100,{ mes "Test"; close; OnNPCWalk: npcspeed 200; npcwalkto 160,160; sleep 5000; // pause for 5 sec.. then.. npcwalkto .x, .y; // walk back to orig position end; OnInit: getmapxy .map$, .x, .y, BL_NPC, strnpcinfo(0); // save orig position end; }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.