Seiro Posted December 14, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 42 Reputation: 0 Joined: 10/24/12 Last Seen: August 11, 2014 Share Posted December 14, 2012 This script is from AnnieRuru prontera,155,177,5 script kjdhfksdjf 100,2,2,{ if ( .summon_timetick + 10 > gettimetick(2) // 10 seconds delay to summon again || mobcount( "this", strnpcinfo(0)+"::Onaa" ) ) end; monster "this", -1,-1, "--ja--", 1952,1, strnpcinfo(0)+"::Onaa"; .summon_timetick = gettimetick(2); sleep 5000; // 5 seconds auto-kill this mob killmonster .map$, strnpcinfo(0) +"::Onaa"; end; OnInit: getmapxy .map$, .@x, .@y, 1; // wtf ... killmonster script command doesn't allow "this" variable Onaa: // prevent server spam error end; } Can anyone edit this for me? This script is working but when I tried to make another one of this, it doesn't spawn a monster How this script works: - It spawns a monster when you step on a cell area - It doesn't summon another monster when you step on the cell again. - It has delay before you can spawn a monster again. What I need: - To make a multiple script of this (more than one), which spawns different monster each. - To make the spawn point into a certain coordinate. (not around the NPC) Ex. This script is placed at [prontera,155,177]. But monster spawns at [prontera,152,165] This is the script I tried StepCellMonster.txt Quote Link to comment Share on other sites More sharing options...
Emistry Posted December 14, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted December 14, 2012 you can try setup like this for duplicate npc.. http://pastebin.com/raw.php?i=mjbNHJ7d it work fine when i test in my server... and the reason for you to unable summon it...i think it's because you set the delay too long Quote Link to comment Share on other sites More sharing options...
Seiro Posted December 15, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 42 Reputation: 0 Joined: 10/24/12 Last Seen: August 11, 2014 Author Share Posted December 15, 2012 you can try setup like this for duplicate npc.. http://pastebin.com/raw.php?i=mjbNHJ7d it work fine when i test in my server... and the reason for you to unable summon it...i think it's because you set the delay too long Oh I mean, I wanted to use different monsters to spawn each spot, that's why I don't wanna use the duplicate. :x Quote Link to comment Share on other sites More sharing options...
Emistry Posted December 15, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted December 15, 2012 try this http://pastebin.com/raw.php?i=AmNQY4up mapname,coordinate duplicate(AutoSummon) AutoSummon#<mob id> -1,3,3,{ Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 15, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 15, 2012 (edited) What I need: - To make a multiple script of this (more than one), which spawns different monster each. - To make the spawn point into a certain coordinate. (not around the NPC) Ex. This script is placed at [prontera,155,177]. But monster spawns at [prontera,152,165] emistry's technique can be use if there's only 1 condition but there's 2 conditions here, so have to use array, but still using npc hidden name as index - script AutoSummon -1,{ end; OnTouch: .@n = atoi( strnpcinfo(2) ); if ( .summon_timetick[.@n] + .spawn_delay > gettimetick(2) || mobcount( "this", strnpcinfo(0)+"::Onaa" ) ) end; monster "this", .mob_spawn[ .@n *2 ], .mob_spawn[ .@n *2 +1 ], "--ja--", .mob_id[.@n], 1, strnpcinfo(0)+"::Onaa"; .summon_timetick[.@n] = gettimetick(2); sleep 60000; // 60 seconds auto-kill this mob killmonster strnpcinfo(4), strnpcinfo(0) +"::Onaa"; end; OnInit: if ( !getstrlen( strnpcinfo(2) ) ) end; // OnInit with duplicate npc will load multiple times .spawn_delay = 120; // a delay of 120 seconds setarray .mob_id, 1952, 1953, 1954; setarray .mob_spawn, 293,200, 155,181, 155,183; Onaa: // prevent server spam error end; } 1@cash,293,200,4 duplicate(AutoSummon) AutoSummon#0 100,3,3 prontera,155,181,4 duplicate(AutoSummon) AutoSummon#1 100,3,3 prontera,155,183,4 duplicate(AutoSummon) AutoSummon#2 100,3,3 a few things need to know about this duplicate with npc variable 1. npc variable is actually share between all duplicate npcs my mission board script uses atoi( strnpcinfo(2) ) to differentiated all npc in different ID 2. if you have 5 duplicated npc, OnInit label will execute 5 times so just need to load it once ... 3. since npc variable is share, and if want to make them unique to each one need to index them with array or getd command to make them do different stuffs .summon_timetick[.@n] <-- if not doing this, the variable will be overwritten by someone else trigger other duplicated npc and btw ... nice find of getting opening bracket is ignored by server when using duplicates =/ didn't know server will not read it ( I thought server spam error for it, but it actually works ) Edited December 15, 2012 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Seiro Posted December 15, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 42 Reputation: 0 Joined: 10/24/12 Last Seen: August 11, 2014 Author Share Posted December 15, 2012 It's working now! one more thing though, How can I make each monster be spawned in different sizes? Like, Large (@monsterbig), and small (@monstersmall)? Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 15, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 15, 2012 (edited) *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};set another array, with settings 0,1,2think this is just a minor edit --> this is support section btw Edited December 15, 2012 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Seiro Posted December 15, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 42 Reputation: 0 Joined: 10/24/12 Last Seen: August 11, 2014 Author Share Posted December 15, 2012 --> this is support section btw I need support on monster sizes script! :P Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 16, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 16, 2012 (edited) prontera,156,180,5 script kjdhfksjf 100,{ monster "this", -1,-1, "--ja--", 1002, 1, "", 0; monster "this", -1,-1, "--ja--", 1002, 1, "", 1; monster "this", -1,-1, "--ja--", 1002, 1, "", 2; } I think we have complicated the solution with advance scripting technique, here is the solution that you can understand better prontera,155,181,4 script AutoSummon#1 -1,3,3,{ end; OnTouch: if ( .summon_timetick + .spawn_delay > gettimetick(2) || mobcount( "this", strnpcinfo(0)+"::Onaa" ) ) end; monster "this", 155, 181, "--ja--", 1953, 1, strnpcinfo(0)+"::Onaa", 1; // small size mob .summon_timetick = gettimetick(2); sleep 60000; // 60 seconds auto-kill this mob killmonster strnpcinfo(4), strnpcinfo(0) +"::Onaa"; end; OnInit: .spawn_delay = 120; // a delay of 120 seconds Onaa: // prevent server spam error end; } Edited December 16, 2012 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Question
Seiro
This script is from AnnieRuru
Can anyone edit this for me?
This script is working but when I tried to make another one of this, it doesn't spawn a monster
How this script works:
- It spawns a monster when you step on a cell area
- It doesn't summon another monster when you step on the cell again.
- It has delay before you can spawn a monster again.
What I need:
- To make a multiple script of this (more than one), which spawns different monster each.
- To make the spawn point into a certain coordinate. (not around the NPC)
Ex.
This script is placed at [prontera,155,177]. But monster spawns at [prontera,152,165]
This is the script I tried
StepCellMonster.txt
Link to comment
Share on other sites
8 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.