Phantom Of Rogue-Gon Posted August 11, 2013 Posted August 11, 2013 can i request again example in arena or gold room when i kill poring i got 1 cashpoint Quote
Lil Troll Posted August 11, 2013 Posted August 11, 2013 (edited) Hope this help: - script OnKillPVP -1,{ OnNPCKillEvent: if( strcharinfo(3) == "mapname" || strcharinfo(3) == "mapname" || strcharinfo(3) == "mapname" || strcharinfo(3) == "mapname" ){ specialeffect2 725; specialeffect2 378; sleep2 900; set #CASHPOINTS,#CASHPOINTS+1; getitem 969,1; dispbottom "You have gained 1 Cash points and 1 Gold. Total is "+#CASHPOINTS+" Cash points." } Added some nice after effects when someone killed. - script OnGoldRoom -1,{ OnNPCKillEvent: if( killedrid == mobID) { specialeffect2 725; specialeffect2 378; sleep2 900; set #CASHPOINTS,#CASHPOINTS+1; getitem 969,1; dispbottom "You have gained 1 Cash points and 1 Gold. Total is "+#CASHPOINTS+" Cash points." } PM me if theres something wrong, hmmm... maybe it should work fine. Edited August 11, 2013 by Lil Troll Quote
Phantom Of Rogue-Gon Posted August 11, 2013 Author Posted August 11, 2013 i try this one what kind of mob is hard to kill? - script OnGoldRoom -1,{ OnNPCKillEvent: if( killedrid == mobID) { specialeffect2 725; specialeffect2 378; sleep2 900; set #CASHPOINTS,#CASHPOINTS+1; getitem 969,1; dispbottom "You have gained 1 Cash points and 1 Gold. Total is "+#CASHPOINTS+" Cash points." this one script where can put the map? Quote
Lil Troll Posted August 11, 2013 Posted August 11, 2013 (edited) what kind of mob is hard to kill? create a custom mob, its easy, modify it by your server rates. this one script where can put the map? there is no map attach in that only individual mobID if you want adding map restriction try this: (Tell me if not working) - script OnGoldRoom -1,{ OnNPCKillEvent: if( killedrid == mobID && strcharinfo(3) == "GoldRoomMap") { specialeffect2 725; specialeffect2 378; sleep2 900; set #CASHPOINTS,#CASHPOINTS+1; getitem 969,1; dispbottom "You have gained 1 Cash points and 1 Gold. Total is "+#CASHPOINTS+" Cash points." Edited August 11, 2013 by Lil Troll Quote
Skorm Posted August 11, 2013 Posted August 11, 2013 Hi I made a script awhile back for a dynamic leveling room that instead of manually adding monsters it takes the level ranges from the database and adds them to a spawn. I think it will work very well here. I have also added the cashpoint option. prontera,160,158,2 script Training Room 100,{ select(.menu$); warp getd(".room"+(@menu-1)+"$[1]"),0,0; end; OnNPCKillEvent: //OnMobDeath: for(set .@p,0;getarraysize(getd(".room"+.@p+"$"));set(.@p,.@p+1)) if( playerattached() ) { if( getd(".room"+.@p+"$[1]") == strcharinfo(3) ) { dispbottom "Cashpoint get! "+#CASHPOINTS++; monster strcharinfo(3),0,0,"--ja--",killedrid,1/*,"Training Room::OnMobDeath"*/; break; } } end; Oninit: //Configuration // # Room Name , Map , MobLvlRngLow , MobLvlRngHigh, #SpawnMobs, Mobs Limit(MAX 128), Optional Search String ; setarray .room0$, "Novice Room %s~%s (<mob>,<mob>...)" , "06guild_01", "0" , "10" , "20" , "128" , "`iName` LIKE '%Por%'" ; // Would make a novice poring room. setarray .room1$, "Beginner Room %s~%s (<mob>,<mob>...)" , "06guild_02", "11" , "20" , "5" , "128" , "" ; setarray .room2$, "Adept Room %s~%s (<mob>,<mob>...)" , "06guild_03", "21" , "30" , "5" , "128" , "" ; setarray .room3$, "Advanced Room %s~%s (<mob>,<mob>...)" , "06guild_04", "31" , "40" , "5" , "128" , "" ; setarray .room4$, "Experts Room %s~%s (<mob>,<mob>...)" , "06guild_05", "41" , "50" , "5" , "128" , "" ; setarray .room5$, "Veterans Room %s~%s (<mob>,<mob>...)" , "06guild_06", "51" , "60" , "6" , "128" , "" ; setarray .room6$, "MVP Room %s~%s (<mob>,<mob>...)" , "06guild_07", "61" , "70" , "7" , "128" , "" ; setarray .room7$, "Like a Boss Room %s~%s (<mob>,<mob>...)", "06guild_08", "71" , "80" , "8" , "128" , "" ; set .srch$, "<mob>"; //String searched and replaced with mob name in the Room Name Feild. set .mvps, 0; //Mvps Summoned or not? 0=Off 1=On //End for(set(.@a,0);getarraysize(getd(".room"+.@a+"$"));set(.@a,.@a+1)) { set .rmn$, ".room"+.@a+"$"; set .nam$, ".name"+.@a+"$"; set .mid$, ".id"+.@a; set .rrm$, getd(.rmn$+"[0]"); set .map$, getd(.rmn$+"[1]"); set .lrl$, getd(.rmn$+"[2]"); set .lrh$, getd(.rmn$+"[3]"); set .nsms, atoi(getd(.rmn$+"[4]")); set .mlim, atoi(getd(.rmn$+"[5]")); set .ops$, getd(.rmn$+"[6]"); set .length, countstr(getd(.rmn$+"[0]"), .srch$); set .lengt, countstr(getd(.rmn$+"[0]"), "%s"); if(.lengt>1) set .mes$[.@a], sprintf(.rrm$,.lrl$,.lrh$); set .len, query_sql("SELECT `ID`,`iName` FROM `mob_db` WHERE `LV` > "+.lrl$+" AND `LV` < "+.lrh$+" "+((.ops$!="")?"AND "+.ops$+" ":"")+((!.mvps)?"AND `MEXP` <= 0 ":"")+"ORDER BY RAND() LIMIT "+((.mlim>128)?128:.mlim )+";",.id,.name$); set .lens, getarraysize(.name$); copyarray getd(.nam$+"[0]"), .name$, .lens; copyarray getd(.mid$+"[0]"), .id, .lens; deletearray .name$; deletearray .id; while(.@i++<=.length ) if(.@i<=.lens) set .mes$[.@a], replacestr(.mes$[.@a], .srch$, getd(.nam$+"["+(.@i-1)+"]"), 1, 1); set .@i,0; for(set(.@h,0);.@h<.lens;set(.@h,.@h+1)) { monster .map$,0,0,"--ja--",getd(.mid$+"["+.@h+"]"),.nsms/*,"Training Room::OnMobDeath"*/; } } set .menu$, implode(.mes$,":"); } 1 Quote
Lil Troll Posted August 11, 2013 Posted August 11, 2013 Wow awesome thanks again Skorm! BTW, Can you clean up this script? /////////////////////////////////////// // LIL TROLL NUB MESSY SCRIPT // // Feel free to modify the script // //////////////////////////////////// //Map,x,y,direction<TAB>script<TAB>NPC NAME<TAB>SpriteID,{ ftown,209,209,4 script Rare Card Trader 604,{ ///////////////////////////////// // ARRAYS // ////////////////////////////////////////////////////////////////////////////////// // WARNING!! DO NOT USE SAME CARD REQUIREMENT OR ELSE IT WILL BE BUGGED // // FINDING FIX ATM... // /////////////////////////////////////////////////////////////////////////////// //Edit Card that npc gives. you can add more cards if you want just add ,4007,4008,4009,4010,4011; and so on.. setarray .CardList[0],4001,4002,4003,4004,4005,4006; // Card that NPC Sells. setarray .CardReq[0],4001,4002,4003,4004,4005,4006; // 1st Requirement. setarray .CardReq1[0],4001,4002,4003,4004,4005,4006; // 2nd Requirement. set $CARD_TRADER$, "[Yugi]"; // Change the name mes $CARD_TRADER$ ; mes "Hi " + strcharinfo(0) +" I do have rare cards here to offer. These card is limited, for every hour the card will be changed. Also I will select random cards in exchange of the cards I offer.."; next; mes $CARD_TRADER$ ; mes "This time I sell " + (getitemname(.CardList)) + "."; mes "I need "+ (getitemname(.CardReq)) +" and "+ (getitemname(.CardReq1)) +"."; // Required 1 & Required 2 next; menu "Yes I want that card!",BBB,"No thanks!",CCC; close; BBB: next; mes $CARD_TRADER$ ; mes "Checking Items:"; sleep2 1000; mes "........."; sleep2 1000; if (countitem(.CardReq)==0) mes "You dont have "+ (getitemname(.CardReq)) +"."; if (countitem(.CardReq1)==0) mes "You dont have "+ (getitemname(.CardReq1)) +"."; if(countitem(.CardReq)>=1 && countitem(.CardReq1)>=1) goto AAA; close; AAA: next; mes $CARD_TRADER$ ; mes "You bought "+ (getitemname(.Cardlist)) +"."; getitem .CardList,1; delitem .CardReq,1; delitem .CardReq1,1; close; CCC: next; mes $CARD_TRADER$ ; mes "See you nextime arround!"; close; OnInit: npctalk "Rare cards has been shuffled!"; initnpctimer; end; ////////////////////////////////////////////////////////////////////////////// // Do not change variables below, unless someone refine the ontimer. // //////////////////////////////////////////////////////////////////////////// // TIMERS // /////////////////////////////// OnTimer3600000: npctalk "Rare cards has been shuffled!"; set .CardList,.CardList[rand(getarraysize(.CardList))]; set .CardReq,.CardReq[rand(getarraysize(.CardReq))]; set .CardReq1,.CardReq1[rand(getarraysize(.CardReq1))]; OnTimer3601000: initnpctimer; end; } Quote
Question
Phantom Of Rogue-Gon
can i request again
example
in arena or gold room when i kill poring i got 1 cashpoint
5 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.