goddameit Posted July 5, 2013 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: October 19, 2017 Share Posted July 5, 2013 (edited) File Name: Instance dungeon File Submitter: goddameit File Submitted: 05 Jul 2013 File Category: Games, Events, Quests Content Author: Goddameit Preview : http://goo.gl/v7rx7 // II_Before Test at rA.17132 II_After Test at rA.17401 // You can use default function which I set to make your own setting on level, monster, reward,... else There are 5 main file in this, now I will introduce one by one. II_Event : This script is used for run some special event when server start and player logout server, also there are 3 default NPC in there, those NPC are mean different dungeon (map) ( preview : http://goo.gl/VJRnG ) What you need to know is this function callfunc "II_Main",<value>; value : 1 ~ 2 is system, do not use it 3 ~ ? is give for you, 3 = first map, 4 = second, ....etc II_Level : This script is dungeon's level setting, you can define how many level, what kind of monster. First set is level start event function ___LevelStart { set .@level,getarg(1,0); set .@map,getarg(0,-1); if( .@level <= 0 || .@map == -1 ) return; instance_announce instance_id(1),"Level : "+.@level+" start!",0; return; } When level start even it was end, still will run this function. There are 2 two variable that you can use, .@level ---> Level that you are running now, it should be 1 ~ ? .@map ---> Map that you are running now, it should be 0 ~ ? - In default script you will see there are 3 default map setting which like this : http://goo.gl/Vd2TC The first switch is used for define map, so case 1, 2, 3 is mean for map 1, 2, 3 if you have more or less map, you have to add or delete case in here. Second switch also mean this map's level setting and its case is mean for level, so if you need more or or less level, you have to add or delete case in here. You can see there is only one level and it only in map 1, so that's mean there is no level on map 2 and map 3, so when you run map 2 or map 3, it will run Game Over event without any level. ___Mob(getarg(0),<mob id>,<amount>,<x>,<y>); This is new function used for spawn monster ( cause there is some checking need to be done before spawn ) ( <amount> : 1 ~ 127 ) If you don't want to specify spawn location, just set <x>,<y> to 0 and it will spawn at random loaction. - All map need to run Game Over event to end this game, you can see in default script default:___GameOver(1,getarg(0));end; ( preview : http://goo.gl/wvkKi ) If game is running at right end, it should run reward function callfunc "II_Reward",.@map,.@pid; II_Reward : This is system use below way to give reward ( preview : http://goo.gl/u6k5b ) case 0 ---> map 1 case 1 ---> map 2 case 2 ---> map 3 ...etc 1. Each map has there own reward list and setting 2. System will choose item from list randomly and how many item will be chosen is set by .@pick 3. System give reward to player randomly, and each item will be given one time. if .@pick over amount of possible (total item amount in list), that mean all item will not be give to player, if it was less and higher than zero, it will choose some item from list, if it was less tan zero, it will give all item from list to player. II_Set : This script is used for define game map and player amount Below NPC will be used for active game after you enter dungeon and also give game map location to system, so if you want to add or delete game map or modify game location, 1@tower,96,20,4 duplicate(II_GameMain) AAAAAAAAA 1002@tower,96,20,4 duplicate(II_GameMain) CCCCCCCCC 1003@tower,96,20,4 duplicate(II_GameMain) BBBBBBBBB 100 now, see this - script II_SET -1,{OnInit: setarray .npc_name$,"AAAAAAAAA","CCCCCCCCC","BBBBBBBBB"; setarray .map_p,1,2,3; end;} Name in .npc_name$ is npc name which same as above npc name which used for define game map and .map_p is used for define how many player need on active this dungeon. II_Main : Don't try to modify this if you can't handle it, this is main system of all. /////////////////////////////////////////////////////////////////////////////////////////////////// IMPORTANT NOTES ABOUT " Instance System Rewrite!! " .If you want to add new map for use at new rA, you have to also add new setting at " II_Set " setarray .iin_name$,"Endless Tower","Endless Tower","Endless Tower"; Those name is come from instance_db.txt ID,Name,LimitTime,EnterMap,EnterX,EnterY,Map1,Map2,Map3,Map4,Map5,Map6,Map7,Map8For example, I want to add new game map ( 4th game map ) and game map will use prontera,here is what I need to do : 1. Add new define into instance_db.txt 10,Instance Prontera,7200,prontera,150,150,prontera 2. Add new define into .iin_name$ setarray .iin_name$,"Endless Tower","Endless Tower","Endless Tower","Instance Prontera"; 3. Else is same as what already said at up. PS : Watch out your map name length!!! /////////////////////////////////////////////////////////////////////////////////////////////////// If your rA version is old than "Instance System Rewrite", use "II_Before" if not, use "II_After" Click here to download this file Edited August 30, 2013 by goddameit Quote Link to comment Share on other sites More sharing options...
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.