Leaderboard
Popular Content
Showing content with the highest reputation on 05/27/12 in all areas
-
Toasty's Warper by: ToastOfDoom So this is a project I've been working on and off for a while and only really just had it done to a release standard recently. The original reason I started this script was cause of Annie's Favorite Warper script. While pretty original in that I think it was the 1st one to implement a favorites menu in a warper, I absolutely detested how ugly that script looked. No offence to annie, but it looked like an absolute nightmare to configure (menu structure in one area, warp data in another, lots of duplicated data all over the place making it very easy to make a mistake). So I set out to write a warper that meets this one objective: Be able to portray the configuration of all map and menu structure data in a single glance. Features: Easy to configure layout Zeny cost configuration on menu/submenu/map levels Configurable dynamic access to menus and maps Remembers last warps Brain hurting complexity in other parts of the script (not guaranteed) Download: ver 1.32 - 21-04-2011 (r14682 trunk) ver 1.31 - 27-04-2011 (r14682 trunk) ver 1.30 - 26-04-2011 (r14682 trunk) ver 1.20 - 12-02-2011 (r14682 trunk) ver 1.10 - 13-01-2011 (r14413 trunk) ver 1.00 - 08-01-2011 (r14413 trunk) Mirrors: ver 1.32 - 21-04-2011 (r14682 trunk) How to configure: Look for the 'LoadData' label in the script (line 184). All menu and map data is stored in this one subroutine. Configuring the menus is as easy as moving lines around. Details for each function as follows. AddLastWarpNode(): Will add a menu item to access previously used warps. The maximum amount of stored last maps is 64, however by default it has been set to 10 (.numLastWarps) AddNode(<node_name>{, <modifier>, <modifier_value>{, <modifier>, ...}}): This will add a submenu to the current menu. The cost value for zeny is optional. The cost value will carry on to all nodes and maps within the submenu unless overwritten but another cost value either at a lower node or map. Setting cost to 0 will cancel any costs from being carried down. //Eg. This will make a menu called "Dungeons" with a menu called "Abbey, Cursed Monastery" within StartNode("Dungeons"); StartNode("Abbey, Cursed Monastery"); AddMap("Abbey, Cursed Monastery - Level 1", "abbey01", 51, 14); AddMap("Abbey, Cursed Monastery - Level 2", "abbey02", 150, 11); ... EndNode(); EndNode(); EndNode(): This will exit the current menu that was opened with AddNode() and go back to the parent menu of that menu. Consider it like brackets. All StartNode()s must end somewhere with an EndNode(). AddMap(<map_title>, <map_name>, <x>, <y>{, <modifier>, <modifier_value>{, <modifier>, ...}}): This will add a map to the current menu. //Eg. This will make a menu called "Towns" and place 5 maps within StartNode("Towns"); AddMap("Alberta", "alberta", 28, 234); AddMap("Aldebaran", "aldebaran", 140, 131); AddMap("Amatsu", "amatsu", 198, 84, 5000); AddMap("Ayothaya", "ayothaya", 150, 163); AddMap("Comodo", "comodo", 209, 143); EndNode(); Modifiers: With the 'AddNode' and 'AddMap' commands you are able to add modifiers to either give a set price or dynamically allow access to the specified menu or map (and some other things). All modifiers will cascade down all children nodes until overwritten by another modifier. You can apply multiple modifiers but only one of each (ie..can't use 2x "gm" modifiers, but you can use 1x "gm", 1x "woe") Descriptions of all avaiable modifiers and examples follow: "zeny" - This sets a zeny cost to either all maps within the set node or the set map depending on how it was used. //Eg. This will make all maps within the 'Dungeons' menu cost 1000z StartNode("Dungeons", "Zeny", 1000); StartNode("Abbey, Cursed Monastery"); AddMap("Abbey, Cursed Monastery - Level 1", "abbey01", 51, 14); AddMap("Abbey, Cursed Monastery - Level 2", "abbey02", 150, 11); ... EndNode(); EndNode(); "gm"- This limits access to the menu/map according to the player's gm level. If set to positive it will check if the player's gm level is above or equal. If set to negative, it will check if the player's gm level is below or equal to the absolute of the value //Eg. This will make all maps within the 'Fields' menu accessible to only GMs above or equal to level 20 StartNode("Fields", "gm", 20); StartNode("Amatsu Fields"); AddMap("Amatsu Field 1", "ama_fild01", 190, 197); EndNode(); StartNode("Ayothaya Fields"); AddMap("Ayothaya Field 1", "ayo_fild01", 173, 134); AddMap("Ayothaya Field 2", "ayo_fild02", 212, 150); ... EndNode(); EndNode(); //This will make all maps within the 'Fields' menu accessible to only players below or equal to level 40 StartNode("Fields", "gm", -40); StartNode("Amatsu Fields"); AddMap("Amatsu Field 1", "ama_fild01", 190, 197); EndNode(); StartNode("Ayothaya Fields"); AddMap("Ayothaya Field 1", "ayo_fild01", 173, 134); AddMap("Ayothaya Field 2", "ayo_fild02", 212, 150); ... EndNode(); EndNode(); "woe"- This limits access to the menu/map according to the current state of WoE. This relies on the OnAgitStart/OnAgitEnd events at the end of the script. //1: active when woe inactive //2: active when woe active //3: active regardless of woe setting(default) //Eg. This will only allow access to the Castles menus and maps when WoE is active StartNode("Castles", "woe", 2); StartNode("Aldebaran Castles"); AddMap("Neuschwanstein(Aldebaran)", "alde_gld", 48, 83, "mapUsers", "aldeg_cas01"); AddMap("Hohenschwangau(Aldebaran)", "alde_gld", 95, 249, "mapUsers", "aldeg_cas02"); ... EndNode(); EndNode(); "job"- This limits access to the menu/map according to the player's current job. Calculation method is exactly the same as the one used for jobs in item_db (ie..add up the bitmasks) (S.) Novice (2^00): 0x00000001 Swordman (2^01): 0x00000002 Mage (2^02): 0x00000004 Archer (2^03): 0x00000008 Acolyte (2^04): 0x00000010 Merchant (2^05): 0x00000020 Thief (2^06): 0x00000040 Knight (2^07): 0x00000080 Priest (2^08): 0x00000100 Wizard (2^09): 0x00000200 Blacksmith (2^10): 0x00000400 Hunter (2^11): 0x00000800 Assassin (2^12): 0x00001000 Unused (2^13): 0x00002000 Crusader (2^14): 0x00004000 Monk (2^15): 0x00008000 Sage (2^16): 0x00010000 Rogue (2^17): 0x00020000 Alchemist (2^18): 0x00040000 Bard/Dancer (2^19): 0x00080000 Unused (2^20): 0x00100000 Taekwon (2^21): 0x00200000 StarGladi (2^22): 0x00400000 Soul Linker (2^23): 0x00800000 Gunslinger (2^24): 0x01000000 Ninja (2^25): 0x02000000 //Eg. This will only allow access to the Payon dungeons to Wizards and Hunters and only when WoE is inactive StartNode("Payon Dungeon", "job", 0x00000A00, "woe", 1); AddMap("Payon Dungeon - Lvl 1", "pay_dun00", 21, 183); AddMap("Payon Dungeon - Lvl 2", "pay_dun01", 19, 33); AddMap("Payon Dungeon - Lvl 3", "pay_dun02", 19, 63); AddMap("Payon Dungeon - Lvl 4", "pay_dun03", 155, 159); AddMap("Payon Dungeon - Lvl 5", "pay_dun04", 201, 204); EndNode(); "upper"- This limits access to the menu/map according to wherever the player is a normal/high/baby class. Like with 'job' this works the same as the 'upper' value in item_db. //1: Normal jobs //2: Upper jobs //4: Baby jobs //Eg. This will only allow access to the casino to baby classes AddMap("Casino", "cmd_in02", 179, 129, "upper", 4); "gender"- This limits access to the menu/map according to the sex of the player. 0 is female, 1 is male, 2 for both. "blvl"- This limits access to the menu/map according to the base level of the player. This works exactly the same as with "gm" except with baselevels instead of gmlevels. "flag"- This will limit access to the menu/map depending on the value of a specified variable. This is very useful for restricting access to things when an event is on or wherever the player as passed a certain quest. //Eg. This will only allow access to the guild dungeons if the global variable $@testEvent is not set to 0. StartNode("Guild Dungeons", "flag", "$@testEvent"); AddMap("Baldur Guild Dungeon", "gld_dun01", 119, 93); AddMap("Luina Guild Dungeon", "gld_dun02", 39, 161); AddMap("Valkyrie Guild Dungeon", "gld_dun03", 50, 44); AddMap("Britoniah Guild Dungeon", "gld_dun04", 116, 45); EndNode(); "function"- This will limit access to a menu/map depending on the output of a specified function. Works very similar to the 'flag' modifier only will allow greater control but is also alot more computationally expensive. Recommend only using when needed and to keep things simple in the function. The script will automatically pass the following variables to the function: //Node: "Node", <nodeid>, <nodename> //Map: "Map", <mapid>, <maptitle>, <mapname>, <mapx>, <mapy>, <mapcost> //Eg. This will only allow access to the Thanatos tower to players that are in a party and above or equal to level 90 StartNode("Thanatos Tower", "function", "PartyCheckFunc", "blvl", 90); AddMap("Thanatos Tower - Lvl 1", "tha_t01", 150, 39); AddMap("Thanatos Tower - Lvl 2", "tha_t02", 150, 136); AddMap("Thanatos Tower - Lvl 3", "tha_t03", 220, 158); AddMap("Thanatos Tower - Lvl 4", "tha_t04", 59, 143); AddMap("Thanatos Tower - Lvl 5", "tha_t05", 62, 11); ... EndNode(); ... function script PartyCheckFunc { return strcharinfo(1) != ""; } "mapUsers"- This will change the map used for the getmapusers() calculation. This allows you to warp to one map, but display the user count for another map (like for castles) Other Settings: .showNodeUserCount: 0/1 turns on/off the user count display for nodes/menus .showMapUserCount: 0/1 turns on/off the user count display for maps Important Notes: In the case that you add a map that doesn't exist a message will be displayed within your map server console indicating the name of the map. There is a limit to the length of the menu can reach. This limit is defined by 2047 characters. When this limit is reached the client will crash. The script has measures to prevent client crashes, but the menu in question will still be broken. A message in the map server console will display indicating the affected menu. Please modify the structure of the menu to prevent the overflow. Additionally all GMs above the set .gmAccessLvl will have the option to check which menus will overflow. Likewise this overflow problem will also affect the lastwarp menu so it is advised you keep the .numLastWarp value to a reasonable value (10-20) Technical stuff: Just some data on the structure of the script for those who want to modify functions (read this if you are interested in picking apart the script) ShowMenu(): Displays the menu and returns the map id of the selected map ComputeMenu(<menu_ptr>): Generates menu string. Modify this to change how you want the menus to look SelectMap(<mapid>): Does the final zeny subtraction and warping to the map after selection. You can modify this to have it do other things with the cost value (eg, subtract coins instead) All map data are stored in an infinite style array of the following names: # = index / 128, % = index % 128 .maps_name_#[%] .maps_map_#[%] .maps_x_#[%] .maps_y_#[%] .maps_cost_#[%] Node data are stored in the following manner: node_ptr$ = .menu_<nodeid>$ node[0] = Node title node[1] = Basic precomputed node menu string node[2+] = Either a pointer to a map or another node_ptr$. If it is a number it is a map id otherwise it is the menu pointer for the next submenu. Last warp menu is simply a pointer to "@menu_lastwarps$" As always will appreciate bugs reports, suggestions & criticism. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License1 point
-
File Name: Caspen Town Original File Submitter: Syouji File Submitted: 06 May 2012 File Category: Maps & Textures Content Author: Syouji This is the original version of Caspen Town that I created. The town comes complete with full exterior and interior maps. It also has 3 field maps & a 3 level dungeon (including a transition map). Warps are not included so its up to you to create warps for the interior maps and dungeon the way you want it. Click here to download this file1 point
-
it depends, if i have php tags php format should be use. just a simple margin: 0 auto; width: 1024px; height: 768px; and you cannot just set the margins to auto without specifying the width of the block. The method above is the standard technique for centering a DIV block using standards-compliant CSS. With this, you can center your blocks without using deprecated HTML tags like <center>. same above.. margin: 0 auto; width: 1024px; height: 768px;1 point
-
I have implemented a lua state class which acts as the interface you have mentioned. The custom client will read all lua related stuff (*.lua > *.lub) from a folder called "scripts" which resides at the root folder of the client. This folder is split into "tables" and "functions" which again contain lua files that are related to either pc, map, accessory, etc. Here's an example of a function I am currently using to get the hair sprite path: GetPcHairSpritePath = function(hair_id, male) local prefix = "" local postfix = "" if hair_id < 1 then hair_id = 1 elseif hair_id > 27 then hair_id = 27 end if male == false then prefix = "Àΰ£Á·/¸Ó¸®Åë/¿©/" postfix = "¿©.spr" else prefix = "Àΰ£Á·/¸Ó¸®Åë/³²/" postfix = "³².spr" end return prefix..hair_id.."_"..postfix end Right now, it is even possible to create custom classes with ease. XML and LUA help a lot in creating customization which is something that I try to achieve. I also plan to export whole classes so that those can be accessed through lua (e.g. network handler, window manager, etc). Therefore an SQL like database would be only good for storing configuration stuff or paths.1 point
-
[Warning]: npc_parse_shop: Item Baseball_Cap [5147] is being sold for FREE in fi le 'npc/custom/GuiltyRO/Guilty Mall.txt', line '38'. 5147:8000000 <- mall script i did try to change the prize on item_db.txt the buy and sell and still this shows. on my mall script the prize is 8million.. how to fix this one?1 point
-
1 point
-
you should close it with bracket i think. something like this...warp: [true, false]1 point
-
Yep that post was dead in Febraury. http://rathena.org/b...ing-contest-20/ Peopleperson491 point
-
Another note that may interest, It is not required to compile the lua, a simple rename to .lub and the client can read it without problem Compiled lua is harder to read, but anybody with common sense can decompile Yom <31 point
-
Black Jack wiki Some photos Ruler Download 21.txt About 'Fooled' When you get Joker card from system, you will be asked which card you will let its point be zero. Set set .joinmax,2; <<--- Number of player set .bjcnmax,2; <<--- How many joker cards1 point