English npc drop money

2 replies
Goto Page
To the start Previous 1 Next To the start
10.08.13 01:58:50 am
Up
pbeloto
User
Offline Off
someone could create a npc drop money ? equal to c - 4 server

example :

when you kill an npc drop money he spread the floor

and also be able to make the npcs nation every 2 minutes in the form of random .

example :

random position of the map .

really appreciate if someone could do that to min : D

sorry my english bad
10.08.13 02:17:16 am
Up
Dynamite07
User
Offline Off
Code:
1
2
3
4
5
6
7
8
9
10
11
12
CoinsDrop={-2,3}

addhook("objectkill","objectkillHook")
function objectkillHook(id)
     if object(id,"type") == 30 then
         local z = math.random(CoinsDrop[1],CoinsDrop[2])
         for i = 1, z do
               parse("spawnitem 66 "..object(id,"tilex")+(math.random(-1,1)).." "..object(id,"tiley")+(math.random(-1,1)))                                    
         end
     end
end
end


Should work. I dont me remember.

"and also be able to make the npcs nation every 2 minutes in the form of random ." what? spawn a random npc each 2 minutes?
10.08.13 02:30:06 am
Up
pbeloto
User
Offline Off
user Dynamite07 has written:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
CoinsDrop={-2,3}

addhook("objectkill","objectkillHook")
function objectkillHook(id)
     if object(id,"type") == 30 then
         local z = math.random(CoinsDrop[1],CoinsDrop[2])
         for i = 1, z do
               parse("spawnitem 66 "..object(id,"tilex")+(math.random(-1,1)).." "..object(id,"tiley")+(math.random(-1,1)))                                    
         end
     end
end
end


Should work. I dont me remember.

"and also be able to make the npcs nation every 2 minutes in the form of random ." what? spawn a random npc each 2 minutes?



yes it works


yes it works , you know create npc spawn with random position ?

#Edit

you know put hp in the npc script ?
To the start Previous 1 Next To the start