Cisqua Posted February 23, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Share Posted February 23, 2013 (edited) anyone can help me to fix this script? normal player click this npc, player will warp, but if gmlvl99 click the npc the menu will show. this code is right? disablenpc "Mall Warper"; disablenpc "Exit"; sleep 3000; loadnpc "npc/gNPC/shop script/mall_shop.txt" dispbottom "finish reloading mall shop."; end; quiz_02,337,83,5 script Exit 869,{ warp "prontera" ,156,156; menu "Cancel",Close,"Reload Shop",Reloadshop,"Kill Boss",Reloadboss; //=========== CANCEL ===========\\ Close: end; //=========== RELOAD MALL SHOP ===========\\ Reloadshop: disablenpc "Headgear 1#SM"; disablenpc "Headgear 2#SM"; disablenpc "Armor#SM"; disablenpc "Shield#SM"; disablenpc "Garment#SM"; disablenpc "Footgear#SM"; disablenpc "Accessory#SM"; disablenpc "One-handed Sword#SM"; disablenpc "Two-handed Sword#SM"; disablenpc "One-handed Spear#SM"; disablenpc "Two-handed Spear#SM"; disablenpc "One-handed Axe#SM"; disablenpc "Two-handed Axe#SM"; disablenpc "Katar#SM"; disablenpc "Dagger#SM"; disablenpc "Rod & Staff#SM"; disablenpc "Bow#SM"; disablenpc "Mace#SM"; disablenpc "Knuckle#SM"; disablenpc "Whip#SM"; disablenpc "Musical Instrument#SM"; disablenpc "Books#SM"; disablenpc "Gun & Rifle#SM"; disablenpc "Fuuma Shuriken#SM"; disablenpc "Ammunition#SM"; disablenpc "Novice Shop#SM"; disablenpc "Blacksmith Shop#SM"; disablenpc "Alchemist Shop#SM"; disablenpc "Healing Item#SM"; disablenpc "Stats Food#SM"; disablenpc "Usable Item#SM"; disablenpc "Pet Store#SM"; disablenpc "Wedding Shop#SM"; disablenpc "Mall Warper"; disablenpc "Exit"; sleep 3000; loadnpc "npc/gNPC/shop script/mall_shop.txt" dispbottom "finish reloading mall shop."; end; //=========== RELOAD BOSS AND MINI BOSS ===========\\ Reloadboss: killmonsterall "abbey02"; // Fallen Bishop Hibram killmonsterall "abbey03"; // Beelzebub killmonsterall "abyss_03"; // Detale killmonsterall "ama_dun03"; // Samurai Specter killmonsterall "anthell02"; // Maya killmonsterall "ayo_dun02"; // Lady Tanee killmonsterall "beach_dun"; // Tao Gunka killmonsterall "ein_dun02"; // RSX-0806 killmonsterall "gef_dun01"; // Dracula killmonsterall "gef_dun02"; // Doppelganger killmonsterall "gef_fild02"; // Orc Hero killmonsterall "gef_fild10"; // Orc Lord killmonsterall "gef_fild14"; // Orc Hero killmonsterall "gl_chyard"; // Dark Lord killmonsterall "gld_dun01"; // Eddga killmonsterall "gld_dun02"; // Doppelganger killmonsterall "gld_dun03"; // Maya killmonsterall "gld_dun04"; // Dark Lord killmonsterall "gon_dun03"; // Evil Snake Lord killmonsterall "ice_dun03"; // Ktullanux killmonsterall "in_sphinx5"; // Pharaoh killmonsterall "jupe_core"; // Vesper killmonsterall "kh_dun02"; // Kiel D-01 killmonsterall "lhz_dun02"; // Egnigem Cenia // killmonsterall "lhz_dun03"; // Assassin Cross Eremes, High Priest Margaretha, High Wizard Kathryne, Lord Knight Seyren, Sniper Cecil, Whitesmith Howard killmonsterall "lou_dun03"; // White Lady killmonsterall "mjolnir_04"; // Mistress killmonsterall "moc_fild17"; // Phreeoni killmonsterall "moc_pryd04"; // Osiris killmonsterall "moc_pryd06"; // Amon Ra killmonsterall "mosk_dun03"; // Zmey Gorynych killmonsterall "niflheim"; // Lord of Death killmonsterall "odin_tem03"; // Valkyrie Randgris killmonsterall "pay_dun04"; // Moonlight Flower killmonsterall "pay_fild11"; // Eddga killmonsterall "prt_maze03"; // Baphomet killmonsterall "prt_sewb4"; // Golden Thief Bug killmonsterall "ra_fild02"; // Atroce killmonsterall "ra_fild03"; // Atroce killmonsterall "ra_fild04"; // Atroce killmonsterall "ra_san05"; // Gloom Under Night killmonsterall "thor_v03"; // Ifrit killmonsterall "treasure02"; // Drake killmonsterall "tur_dun04"; // Turtle General killmonsterall "ve_fild01"; // Atroce killmonsterall "ve_fild02"; // Atroce killmonsterall "xmas_dun02"; // Stormy Knight killmonsterall "xmas_fild01"; // Garm dispbottom "finish reloading boss monster's."; end; } Edited February 23, 2013 by Cisqua Quote Link to comment Share on other sites More sharing options...
HollyEnix Posted February 23, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 9 Reputation: 4 Joined: 12/15/11 Last Seen: April 8, 2019 Share Posted February 23, 2013 (edited) First off, disablenpc only disables the npc until you enable it again. Imo, this does not unload the npc. So when you load the mall shop npcs back in, they'll be on the server twice, basically. Info disablenpc * disablenpc "npcname"; * enablenpc "npcname"; These two commands will disable and enable, respectively, an NPC objectspecified by name. The disabled NPC will disappear from sight and will no longerbe triggerable in the normal way. It is not clear whether it will still beaccessible through 'donpcevent' and other triggering commands, but it probablywill be. You can disable even warp NPCs if you know their object names, which isan easy way to make a map only accessible through walking half the time. Thenyou 'enablenpc' them back.You can also use these commands to create the illusion of an NPC switchingbetween several locations, which is often better than actually moving the NPC -create one NPC object with a visible and a hidden part to their name, make a fewcopies, and then disable all except one. use the commands @unloadnpc and @loadnpc in the script instead, maybe, or edit the source to be able reload only a single script (just want to show you all options, doubt you can do the 2nd option though) Also, when you kill all monsters on a map, this does not reset the timer of the mobs. For instance, when there's Garm up and you kill all monsters on the map, Garm will have its full respawn time again. If Garm would not be up and you kill all mosnters on the map, Garm's timer will not reset and still spawn after its current timer. Easiest method would be to reload the whole mobdb, however that would result in respawning other mobs that have a timer too. Otherwise, you could let the mvps spawn from an extern npc script and just reload that one single script with the method you used at the mall shop npcs. If you want to do a GM check to warp all players below a certain gm lvl you can do *getgmlevel(); This function will return the GM level of the account to which the invokingcharacter belongs. If this is somehow executed from a console command, 99 willbe returned, and 0 will be returned if the account has no GM level. This allows you to make NPC's only accessable for certain GM levels, or behavespecially when talked to by GMs.if (getgmlevel()) mes "What is your command, your godhood?";if (getgmlevel()) goto Wherever; an if-clause would look like this if ( getgmlevel() < 99 ) { x } if the GM-level is lower than 99 , then do x Hope I could help you a bit maybe you can even fix it on your own now Just try around, learning by doing! Edited February 23, 2013 by HollyEnix Quote Link to comment Share on other sites More sharing options...
Cisqua Posted February 23, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Author Share Posted February 23, 2013 (edited) this is the script ive done but something wrong with this script.. about unloadnpc and loadnpc what is the correct script command for this? quiz_02,337,83,5 script Exit 869,{ if (getgmlevel() >= 99) goto MENU_Admin; warp "prontera" ,156,156; end; MENU_Admin: menu "Cancel",Close,"Reload Shop",Reloadshop; //=========== WARP PRONTERA ===========\\ Warp: warp "prontera" ,156,156; end; //=========== CANCEL ===========\\ Close: end; //=========== RELOAD MALL SHOP ===========\\ Reloadshop: unloadnpc "Headgear 1#SM"; unloadnpc "Headgear 2#SM"; unloadnpc "Armor#SM"; unloadnpc "Shield#SM"; unloadnpc "Garment#SM"; unloadnpc "Footgear#SM"; unloadnpc "Accessory#SM"; unloadnpc "One-handed Sword#SM"; unloadnpc "Two-handed Sword#SM"; unloadnpc "One-handed Spear#SM"; unloadnpc "Two-handed Spear#SM"; unloadnpc "One-handed Axe#SM"; unloadnpc "Two-handed Axe#SM"; unloadnpc "Katar#SM"; unloadnpc "Dagger#SM"; unloadnpc "Rod & Staff#SM"; unloadnpc "Bow#SM"; unloadnpc "Mace#SM"; unloadnpc "Knuckle#SM"; unloadnpc "Whip#SM"; unloadnpc "Musical Instrument#SM"; unloadnpc "Books#SM"; unloadnpc "Gun & Rifle#SM"; unloadnpc "Fuuma Shuriken#SM"; unloadnpc "Ammunition#SM"; unloadnpc "Novice Shop#SM"; unloadnpc "Blacksmith Shop#SM"; unloadnpc "Alchemist Shop#SM"; unloadnpc "Healing Item#SM"; unloadnpc "Stats Food#SM"; unloadnpc "Usable Item#SM"; unloadnpc "Pet Store#SM"; unloadnpc "Wedding Shop#SM"; unloadnpc "Mall Warper"; unloadnpc "Exit"; sleep 3000; // 3 seconds before loading script loadnpc "npc/mall_shop.txt" dispbottom "finish reloading mall shop."; end; } Edited February 23, 2013 by Cisqua Quote Link to comment Share on other sites More sharing options...
DJFUNK Posted February 23, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 115 Reputation: 4 Joined: 10/25/12 Last Seen: August 31, 2023 Share Posted February 23, 2013 if ( getgroupid() < 99 ) { x } Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 23, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:38 PM Share Posted February 23, 2013 like this ? http://pastebin.com/raw.php?i=jbau3hB4 Quote Link to comment Share on other sites More sharing options...
Cisqua Posted February 24, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Author Share Posted February 24, 2013 (edited) i have this error in my map server Emistry. [Error]: Loading NPC file: npc/Test Script/test.txt script error on npc/Test Script/test.txt line 46 parse_line: expect command, missing function name or calling undeclared func tion 41 : disablenpc "Pet Store#SM"; 42 : disablenpc "Wedding Shop#SM"; 43 : disablenpc "Mall Warper"; 44 : disablenpc "Exit"; 45 : sleep2 3000; * 46 : 'l'oadnpc "npc/gNPC/shop script/mall_shop.txt" 47 : dispbottom "finish reloading mall shop."; 48 : break; 49 : } 50 : close; 51 : } Edited February 24, 2013 by Cisqua Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 24, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:38 PM Share Posted February 24, 2013 isnt that your own script ? i thought you have some custom loadnpc / unloadnpc script command to load npc... ? Quote Link to comment Share on other sites More sharing options...
Cisqua Posted February 24, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Author Share Posted February 24, 2013 (edited) nope i dont have... so what command should i use? atcommand @loadnpc "npc/gNPC/shop script/mall_shop.txt"? Edited February 24, 2013 by Cisqua Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 24, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 05:38 PM Share Posted February 24, 2013 atcommand "@loadnpc npc/......mallshop.txt"; Quote Link to comment Share on other sites More sharing options...
Cisqua Posted February 24, 2013 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 131 Reputation: 1 Joined: 12/29/12 Last Seen: August 10, 2016 Author Share Posted February 24, 2013 (edited) @Emistry the shop is not unload it just hide and when i used the script all shop will be duplicate.. i have this now. but my get this. [Error]: Server received crash signal! Attempting to save all online characters!Map-Server has crashed! quiz_02,335,74,5 script Exit 869,{ switch( select( "Warp", ( getgmlevel() < 99 )?"":"Reload Shop" )){ Case 1: warp "prontera" ,156,156; break; Case 2: atcommand "@unloadnpc Headgear 1#SM"; sleep2 500; atcommand "@unloadnpc Headgear 2#SM"; sleep2 500; atcommand "@unloadnpc Armor#SM"; sleep2 500; atcommand "@unloadnpc Shield#SM"; sleep2 500; atcommand "@unloadnpc Garment#SM"; sleep2 500; atcommand "@unloadnpc Footgear#SM"; sleep2 500; atcommand "@unloadnpc Accessory#SM"; sleep2 500; atcommand "@unloadnpc One-handed Sword#SM"; sleep2 500; atcommand "@unloadnpc Two-handed Sword#SM"; sleep2 500; atcommand "@unloadnpc One-handed Spear#SM"; sleep2 500; atcommand "@unloadnpc Two-handed Spear#SM"; sleep2 500; atcommand "@unloadnpc One-handed Axe#SM"; sleep2 500; atcommand "@unloadnpc Two-handed Axe#SM"; sleep2 500; atcommand "@unloadnpc Katar#SM"; sleep2 500; atcommand "@unloadnpc Dagger#SM"; sleep2 500; atcommand "@unloadnpc Rod & Staff#SM"; sleep2 500; atcommand "@unloadnpc Bow#SM"; sleep2 500; atcommand "@unloadnpc Mace#SM"; sleep2 500; atcommand "@unloadnpc Knuckle#SM"; sleep2 500; atcommand "@unloadnpc Whip#SM"; sleep2 500; atcommand "@unloadnpc Musical Instrument#SM"; sleep2 500; atcommand "@unloadnpc Books#SM"; sleep2 500; atcommand "@unloadnpc Gun & Rifle#SM"; sleep2 500; atcommand "@unloadnpc Fuuma Shuriken#SM"; sleep2 500; atcommand "@unloadnpc Ammunition#SM"; sleep2 500; atcommand "@unloadnpc Novice Shop#SM"; sleep2 500; atcommand "@unloadnpc Blacksmith Shop#SM"; sleep2 500; atcommand "@unloadnpc Alchemist Shop#SM"; sleep2 500; atcommand "@unloadnpc Healing Item#SM"; sleep2 500; atcommand "@unloadnpc Stats Food#SM"; sleep2 500; atcommand "@unloadnpc Usable Item#SM"; sleep2 500; atcommand "@unloadnpc Pet Store#SM"; sleep2 500; atcommand "@unloadnpc Wedding Shop#SM"; sleep2 500; atcommand "@unloadnpc Mall Warper"; sleep2 500; atcommand "@unloadnpc Exit"; sleep2 3000; atcommand "@loadnpc npc/Test Script/mall.txt"; dispbottom "finish reloading mall shop."; break; } close; } Edited February 24, 2013 by Cisqua Quote Link to comment Share on other sites More sharing options...
Question
Cisqua
anyone can help me to fix this script?
normal player click this npc, player will warp, but if gmlvl99 click the npc the menu will show.
this code is right?
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.