No. of specific mobs killed?

smoochy boys on tour

Effy

LOMCN n00bie
Mar 17, 2009
9
0
12
I've searched but I'm sick of reading "idk but u could try this" and hearing about variables and crap.

Is there no simple way to make a script know when a player has called X amount of Y mobs?

thanks
 

Weikster

LOMCN Veteran
Veteran
Jan 21, 2009
421
11
44
36th chamber
Can be done, but will require lots of text lists OR quest flags depending on how many of them you want to kill.

Using texts example:

In Qfunction start by adding:

[@ONKILLMOB(Woomataurus)]
#IF
CHECK [100] 1 <---have npc set this to 1 when accepting quest.
#ACT
goto @secondc
#ELSEACT
break
#IF
CHECK [101] 1 <---set to 1 once they killed all 5
#ACT
break
#ELSEACT
goto @next
[@next]
#IF
CHECKNAMELIST Wooma1.txt
#ACT
goto @next1
#ELSEACT
ADDNAMELIST Wooma1.txt
SENDMSG 6 "You've killed 1 Woomataurus, 4 to go!"
break
[@next1]
#IF
CHECKNAMELIST Wooma2.txt
#ACT
goto @next2
#ELSEACT
ADDNAMELIST Wooma2.txt
SENDMSG 6 "You've killed 2 Woomataurus's, 3 to go!"
break
[@next2]
#IF
CHECKNAMELIST Wooma3.txt
#ACT
goto @next3
#ELSEACT
ADDNAMELIST Wooma3.txt
SENDMSG 6 "You've killed 3 Woomataurus's, 2 to go"
break
[@next3]
#IF
CHECKNAMELIST Wooma4.txt
#ACT
goto @next5
#ELSEACT
ADDNAMELIST Wooma4.txt
SENDMSG 6 "You've killed 4 Woomataurus's, only 1 to go!"
break
[@next5]
#ACT
SET [101] 1
SENDMSG 6 "You have killed all 5 Woomataurus's, goto Shaeffer to get reward."
break

Then heres the npc script:

[@main]
#IF
CHECKNAMELIST WoomaDid.txt
#ACT
goto @notA
#ELSEACT
goto @main-2
[@notA]
Sorry <$USERNAME>, you can only do this once.\
<Close/@exit>
[@main-2]
#IF
CHECK [100] 1
CHECK [101] 1
#ACT
GIVE GOLD 2000000
SET [100] 0
SET [101] 0
DELNAMELIST Wooma1.txt
DELNAMELIST Wooma2.txt
DELNAMELIST Wooma3.txt
DELNAMELIST Wooma4.txt
ADDNAMELIST WoomaDid.txt
#SAY
Well done <$USERNAME>, enjoy your reward!\
<Exit/@exit>
#ELSEACT
goto @check1
[@check1]
#IF
CHECK [100] 1
CHECK [101] 0
#SAY
You haven't killed enough Woomataurus's yet!\
<Close/@exit>
#ELSESAY
Hello <$USERNAME>, would you like to enter a quest\
to kill <5> Woomataurus's?\
You will gain 2,000,000 gold!\
<Sure/@next> I'll give it a shot.\
<No Thanks/@exit>

[@next]
#ACT
SET [100] 1
#SAY
Ok then <$USERNAME>, go and kill the Woomataurus <5>\
times, then come back to me for your reward.\
<Ok/@exit>

Add into Market_Def Folder:
1. QFunction script.
2. Npc text
3. all text lists
Wooma1,Wooma2,Wooma3,Wooma4,WoomaDid.txt
4. Add NPC to TBL_MERCHANT in SQL.

Of course you can edit reward and so on, but if you are making for alot, say 50, It'd be better off using Flags instead of texts. Just replace Addnamelist etc with Set [???]
And if you want to reset quest for everyone, just delete names out of WoomaDid.txt and its ready.
Screnies of the above functioning.
 

Attachments

  • Images01.JPG
    Images01.JPG
    166 KB · Views: 105
  • Images02.JPG
    Images02.JPG
    157.2 KB · Views: 107
  • Images03.JPG
    Images03.JPG
    156.1 KB · Views: 104
Last edited:
Upvote 0

Skins

LOMCN n00bie
Mar 18, 2009
6
0
12
Why Is It lame lol ? He gave you the answer you was looking for..

The answer was lame, i.e. it can't be done easily.

Thanks a lot Weikster, that's a crap load of script though for something so relatively simple lol. Gonna give it a go though i'm not a fan of using namelists
 
Upvote 0

12345678

Dedicated Member
Dedicated Member
Sep 1, 2004
163
0
62
Try not to use it for mobs, that people will be killing alot of. It will cause you alot of lag, because the scripts run every time that mob is killed.
 
Upvote 0

Skins

LOMCN n00bie
Mar 18, 2009
6
0
12
Try not to use it for mobs, that people will be killing alot of. It will cause you alot of lag, because the scripts run every time that mob is killed.

Ah k, that sucks too then lol.

Luckily it's for BDD 1f, and no1 ever kills those dam ETs
 
Upvote 0

Liandrin2

Golden Oldie
Golden Oldie
Loyal Member
Jan 14, 2004
890
6
125
It's a horrible script, the more mobs you add to be killed the more lag it's going to cause and I'd just stay clear of it. Killing a WT a few times would prob be ok, but if your wanting people to kill a few hundred ET's in BDD then it's just not going to work out.

Variables are an option but they are aparently very buggy when used alot, besides you don't seem interested in anything that may require effort.

How there was never a simple system for this coded into the files I don't know.
 
Upvote 0

^G0trex

Golden Oldie
Golden Oldie
Nov 7, 2003
1,946
28
155
Bham
It's 20 ET's in BDD...the ones no1 ever kills, that will be ok won't it?

If you think it's going to cause lag though I'll just leave it out...it's only a small part of the quest
 
Last edited:
Upvote 0

Liandrin2

Golden Oldie
Golden Oldie
Loyal Member
Jan 14, 2004
890
6
125
Its feasable, although when you start writing the script you will see just how many calls there are to namelists and how large it gets.

Personally I'd stick with a 1/20 item dropping or needing 20 of an item they drop each time. It's not what you want I know but it will take a load off the server.
 
Upvote 0

^G0trex

Golden Oldie
Golden Oldie
Nov 7, 2003
1,946
28
155
Bham
Its feasable, although when you start writing the script you will see just how many calls there are to namelists and how large it gets.

Personally I'd stick with a 1/20 item dropping or needing 20 of an item they drop each time. It's not what you want I know but it will take a load off the server.

I use flags not namelists.

Might try the item one
 
Upvote 0

IceMan

Hero's Act Mir 2
Legendary
Apr 17, 2003
8,544
2
370
350
useing Variables is not buggin if you write the npcs and info rite i done alot of testing seems ok with no errors or bad lag
 
Upvote 0