Jump to content

Mabuhay

Members
  • Posts

    446
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by Mabuhay

  1. If I am right, the item_db VIEW ID column should be WEAPON ID not the view id of the weapon. The rest is correct. View: For normal items, defines a replacement view-sprite for the item (eg: Making apples look like apple juice). The special case are weapons and ammo where this value indicates the weapon-class of the item. For weapons, the types are: 0: bare fist 1: Daggers 2: One-handed swords 3: Two-handed swords 4: One-handed spears 5: Two-handed spears 6: One-handed axes 7: Two-handed axes 8: Maces 9: Unused 10: Staves 11: Bows 12: Knuckles 13: Musical Instruments 14: Whips 15: Books 16: Katars 17: Revolvers 18: Rifles 19: Gatling guns 20: Shotguns 21: Grenade launchers 22: Fuuma Shurikens 23: Two-handed staves 24: Max Type 25: Dual-wield Daggers 26: Dual-wield Swords 27: Dual-wield Axes 28: Dagger + Sword 29: Dagger + Axe 30: Sword + Axe
  2. Change getitem 22654,1; to getitem 22654,(@stopped == 1) ? 2:1;
  3. Hardcoded. Use HexEditor (or any program which does the same job that you want). Look for the job name and change it there.
  4. *identifyall({<type>{,<account_id>}}); Returns the count of unidentified items in the player inventory. If <type> is true the command will identify all the unidentified items as well (default). If <type> is false the command only returns the count of unidentified items.
  5. // ----------------------------------------------------------- // 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";
  6. Should be used as robe. not headgear.
  7. 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.
  8. 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(!(.@nb = query_sql(SELECT `account_id` FROM `login` WHERE `group_id` = '5'", .@aid))) { dispbottom "No data found."; end; } dispbottom "VIP Account ID list :"; for ( .@i = 0; .@i < .@nb; .@i++ ) dispbottom (.@i+1) +". Account ID : "+ .@aid[.@i]; dispbottom "Total of "+.@nb +" Active VIP account(s)."; end; OnInit: bindatcmd "checkvip", strnpcinfo(0)+"::OnCheck", 60, 60; // @checkvip to list active vip accounts }
  9. *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
  10. store the original looks to a temporary character var then set it again when player finishes fishing
  11. Hi, I was wondering if there are any available 'furniture sprites' here? Something like tables, chairs, or something alike. TIA
  12. 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.
  13. There should be an error. Its a waste of time to guess the problem.
  14. 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...
  15. getmapxy(@mapname$,@mapx,@mapy,0) -> getmapxy(@mapname$,@mapx,@mapy,BL_PC)
  16. I already sent you the visual instruction how to determine.. Please read it.
  17. 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, $@partymembername$[] is a global temporary string array which contains all the names of these party members (only set when type is 0 or not specified) $@partymembercid[] is a global temporary number array which contains the character id of these party members. (only set when type is 1) $@partymemberaid[] is a global temporary number array which contains the account id of these party members. (only set when type is 2) $@partymembercount 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 $@partymembercount 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. $@partymembercount 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 $@partymember***** // 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 $@partymember***** variables. .@count = $@partymembercount; copyarray .@name$[0], $@partymembername$[0], $@partymembercount; // list the party member names for (.@i = 0; .@i < .@count; .@i++) mes (.@i +1) + ". ^0000FF" + .@name$[.@i] + "^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 ( $@partymembercount != .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 ( .@i = 0; .@i < $@partymembercount; .@i++ ) if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) .@count_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 ( .@count_online != .register_num ) { mes "All your party members must be online to continue"; close; } // copy the array to prevent players cheating the system copyarray .@partymembercid, $@partymembercid, .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 ( $@partymembercount != .register_num ) { mes "You've made changes to your party !"; close; } for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( .@partymembercid[.@i] != $@partymembercid[.@i] ) { 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. Gold_Room_Script_Download
  18. 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.
  19. 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`. "$@" - 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. ".@" - 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 .@var;' 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 $@name - temporary global integer variable $@name$ - temporary global string variable .name - NPC integer variable .name$ - NPC string variable .@name - scope integer variable .@name$ - 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
  20. Use `OnInstanceInit` instead of `OnInit`
  21. https://rathena.org/board/topic/122835-gstorage-isnt-working/#comment-373841
  22. 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!
  23. Im assuming that you are using old server files. Check your own doc/sample/instancing.txt
  24. You can start learning how to instance here: https://github.com/rathena/rathena/blob/master/doc/sample/instancing.txt
×
×
  • Create New...