Code: mob
verb
KatonG()
set category = "Ninjutsu"
set name = "Katon Goukakyuu no Jutsu "
if(usr.firing==1)
usr<<"You cannot do this because you are already using some jutsu!!!"
return
if(usr.resting==1)
usr<<"Sorry you canīt do it while resting..."
return
if(usr.chakrac < 100)
var/CCusage = rand(1,1)
if(usr.chakra<CCusage)
usr<<"Sorry you donīt have enough chakra..."
return
if(CCusage < 1)
usr << "[CCusage]/20 Chakra converted"
usr.chakra -= CCusage
return
if(CCusage >= 1)
view(usr) << "[usr]: Katon Goukakyuu no Jutsu!!!"
usr << "[CCusage]/20 Chakra converted"
usr.frozen=1
var/obj/KatonT/K = new /obj/KatonT
var/obj/KatonB/B = new /obj/KatonB
K.nin=usr.ninat
K.dir = usr.dir
K.name="[usr]"
K.Gowner=usr
B.nin=usr.ninat
B.dir = usr.dir
B.name="[usr]"
B.Gowner=usr
if(usr.dir==NORTH)
K.loc=locate(usr.x,usr.y+1,usr.z)
B.loc=locate(usr.x,usr.y+2,usr.z)
if(usr.dir==SOUTH)
K.loc=locate(usr.x,usr.y-1,usr.z)
B.loc=locate(usr.x,usr.y-2,usr.z)
if(usr.dir==WEST)
K.loc=locate(usr.x-1,usr.y,usr.z)
B.loc=locate(usr.x-2,usr.y,usr.z)
if(usr.dir==EAST)
K.loc=locate(usr.x+1,usr.y,usr.z)
B.loc=locate(usr.x+2,usr.y,usr.z)
sleep(30)
usr.frozen=0
del(K)
del(B)
obj
KatonT
icon = 'Fire.dmi'
icon_state = "Tail"
density=1
layer = 9
var
Gowner
nin
ninat
Bump(obstacle)
if(ismob(obstacle))
var/katondamage = 50
var/damage1 = katondamage*ninat
var/damage2 = katondamage/obstacle:nindf
var/damage3 = damage1 - damage2
var/damage = round(katondamage + damage3)
if(damage<0)
damage = 0
Gowner<<"You hit [obstacle] with Katon Goukakyuu no Jutsu for [damage] damage..."
obj
KatonB
icon = 'Fire.dmi'
icon_state = "Ball"
density=1
layer = 9
var
Gowner
nin
ninat
Bump(obstacle)
if(ismob(obstacle))
var/katondamage = 50
var/damage1 = katondamage*ninat
var/damage2 = katondamage/obstacle:nindf
var/damage3 = damage1 - damage2
var/damage = round(katondamage + damage3)
if(damage<0)
damage = 0
Gowner<<"You hit [obstacle] with Katon Goukakyuu no Jutsu for [damage] damage..."
Problem description: The code work all fine execpt in the part where it shoul it the target for some reason it does not it can anyone help me please
</1></0></0></100>
1
2
ID:145275
May 1 2006, 2:59 pm
|
|
May 1 2006, 3:04 pm
|
|
Your problem is that your your creating a new obj and setting its location to a set spot. the obj isn't bumping anything.
|
In response to Crzylme
|
|
i unsderstood what you mean and changed but know does not even show the effects and dont hit
mob verb KatonG() set category = "Ninjutsu" set name = "Katon Goukakyuu no Jutsu " if(usr.firing==1) usr<<"You cannot do this because you are already using some jutsu!!!" return if(usr.resting==1) usr<<"Sorry you canīt do it while resting..." return if(usr.chakrac < 100) var/CCusage = rand(1,1) if(usr.chakra<CCusage) usr<<"Sorry you donīt have enough chakra..." return if(CCusage < 1) usr << "[CCusage]/20 Chakra converted" usr.chakra -= CCusage return if(CCusage >= 1) view(usr) << "[usr]: Katon Goukakyuu no Jutsu!!!" usr << "[CCusage]/20 Chakra converted" usr.frozen=1 if(usr.dir==NORTH) var/obj/KatonT/K = new(usr.x,usr.y+1,usr.z) var/obj/KatonB/B = new(usr.x,usr.y+2,usr.z) K.nin=usr.ninat K.dir = usr.dir K.name="[usr]" K.Gowner=usr B.nin=usr.ninat B.dir = usr.dir B.name="[usr]" B.Gowner=usr sleep(30) usr.frozen=0 del(K) del(B) if(usr.dir==SOUTH) var/obj/KatonT/K = new(usr.x,usr.y-1,usr.z) var/obj/KatonB/B = new(usr.x,usr.y-2,usr.z) K.nin=usr.ninat K.dir = usr.dir K.name="[usr]" K.Gowner=usr B.nin=usr.ninat B.dir = usr.dir B.name="[usr]" B.Gowner=usr sleep(30) usr.frozen=0 del(K) del(B) if(usr.dir==WEST) var/obj/KatonT/K = new(usr.x-1,usr.y,usr.z) var/obj/KatonB/B = new(usr.x-2,usr.y,usr.z) K.nin=usr.ninat K.dir = usr.dir K.name="[usr]" K.Gowner=usr B.nin=usr.ninat B.dir = usr.dir B.name="[usr]" B.Gowner=usr sleep(30) usr.frozen=0 del(K) del(B) if(usr.dir==EAST) var/obj/KatonT/K = new(usr.x+1,usr.y,usr.z) var/obj/KatonB/B = new(usr.x+2,usr.y,usr.z) K.nin=usr.ninat K.dir = usr.dir K.name="[usr]" K.Gowner=usr B.nin=usr.ninat B.dir = usr.dir B.name="[usr]" B.Gowner=usr sleep(30) usr.frozen=0 del(K) del(B) |
In response to Destroior
|
|
Please put your code inside <dm> tags so we can read it.
In your verb that set of if(usr.dir==suchandsuch) blocks is frickin' hideous. Notice, first of all, how much code is duplicated inside each if() block and therefore obviously belongs outside them. Second of all, you need to look up get_step(), which eliminates the need for those ifs. Lummox JR |
In response to Lummox JR
|
|
i dont want the jutsu to move i want it to hit who is in front of me when i use that jutsu the jutsu will not move from the sameplace until is gone
- Canīt you guys please show me what is wrong in my code please i really need help |
In response to Destroior
|
|
Hideous code, but besides that, make sure you have a Bump() in the obj, a WORKING one, and that the obj has density 1.
And like someone already pointed out, <*dm> (Without the *) tags are wubby. |
In response to Mysame
|
|
mob verb KatonG() set category = "Ninjutsu" set name = "Katon Goukakyuu no Jutsu " if(usr.firing==1) usr<<"You cannot do this because you are already using some jutsu!!!" return if(usr.resting==1) usr<<"Sorry you canīt do it while resting..." return if(usr.chakrac < 100) var/CCusage = rand(1,1) if(usr.chakra<CCusage) usr<<"Sorry you donīt have enough chakra..." return if(CCusage < 1) usr << "[CCusage]/20 Chakra converted" usr.chakra -= CCusage return if(CCusage >= 1) view(usr) << "[usr]: Katon Goukakyuu no Jutsu!!!" usr << "[CCusage]/20 Chakra converted" usr.frozen=1 var/obj/KatonT/K = new(usr.loc) var/obj/KatonB/B = new(usr.loc) K.nin=usr.ninat K.dir = usr.dir K.name="[usr]" K.Gowner=usr B.nin=usr.ninat B.dir = usr.dir B.name="[usr]" B.Gowner=usr walk(K,usr.dir,1) walk(B,usr.dir,1) sleep(10) K.icon_state = "Tail" B.icon_state = "Ball" walk(B,0) walk(K,0) sleep(30) usr.frozen=0 del(K) del(B) Now it works the bump but i cant make it so that the icon only show when the tail is in front of the person who uses in front i mean one step away and the ball 2 steps away and so that they stop when they are in that position like that the ball comes first then the tail i dont know the reason please can anyone help |
In response to Destroior
|
|
mob
verb KatonG() set category = "Ninjutsu" set name = "Katon Goukakyuu no Jutsu " if(usr.firing==1) usr<<"You cannot do this because you are already using some jutsu!!!" return if(usr.resting==1) usr<<"Sorry you canīt do it while resting..." return if(usr.chakrac < 100) var/CCusage = rand(1,1) if(usr.chakra<CCusage) usr<<"Sorry you donīt have enough chakra..." return if(CCusage < 1) usr << "[CCusage]/20 Chakra converted" usr.chakra -= CCusage return if(CCusage >= 1) view(usr) << "[usr]: Katon Goukakyuu no Jutsu!!!" usr << "[CCusage]/20 Chakra converted" usr.frozen=1 var/obj/KatonT/K = new /obj/KatonT var/obj/KatonB/B = new /obj/KatonB K.icon_state = "Tail" B.icon_state = "Ball" if(usr.dir==NORTH) K.loc = usr.loc K.y+=1 K.dir = usr.dir K.Gowner=usr B.loc = usr.loc B.y+=2 B.dir = usr.dir B.Gowner=usr for(var/obj/KatonB/KB) if(KB.Gowner==usr) BACK for(var/mob/M in KB.loc) (Input your damage calc) M.health-=damage if(M.health<=0) M.DeathCheck() else sleep(7) goto BACK for(var/obj/KatonT/TB) if(TB.Gowner==usr) for(var/mob/M in TB.loc) (Input your damage calc) M.health-=damage if(M.health<=0) M.DeathCheck() if(usr.dir==SOUTH) K.loc = usr.loc K.y-=1 K.dir = usr.dir K.Gowner=usr B.loc = usr.loc B.y-=2 B.dir = usr.dir B.Gowner=usr for(var/obj/KatonB/KB) if(KB.Gowner==usr) BACK for(var/mob/M in KB.loc) (Input your damage calc) M.health-=damage if(M.health<=0) M.DeathCheck() else sleep(7) goto BACK for(var/obj/KatonT/TB) if(TB.Gowner==usr) for(var/mob/M in TB.loc) (Input your damage calc) M.health-=damage if(M.health<=0) M.DeathCheck() if(usr.dir==WEST) K.loc = usr.loc K.x-=1 K.dir = usr.dir K.Gowner=usr B.loc = usr.loc B.x-=2 B.dir = usr.dir B.Gowner=usr for(var/obj/KatonB/KB) if(KB.Gowner==usr) BACK for(var/mob/M in KB.loc) (Input your damage calc) M.health-=damage if(M.health<=0) M.DeathCheck() else sleep(7) goto BACK for(var/obj/KatonT/TB) if(TB.Gowner==usr) for(var/mob/M in TB.loc) (Input your damage calc) M.health-=damage if(M.health<=0) M.DeathCheck() if(usr.dir==EAST) K.loc = usr.loc K.x+=1 K.dir = usr.dir K.Gowner=usr B.loc = usr.loc B.x+=2 B.dir = usr.dir B.Gowner=usr for(var/obj/KatonB/KB) if(KB.Gowner==usr) BACK for(var/mob/M in KB.loc) (Input your damage calc) M.health-=damage if(M.health<=0) M.DeathCheck() else sleep(7) goto BACK for(var/obj/KatonT/TB) if(TB.Gowner==usr) for(var/mob/M in TB.loc) (Input your damage calc) M.health-=damage if(M.health<=0) M.DeathCheck() sleep(30) usr.frozen=0 usr.firing=0 del(K) del(B) return |
In response to Bustercannon
|
|
Argh use the DM tags please
|
In response to A.T.H.K
|
|
o_o
|
In response to Bustercannon
|
|
Bustercannon wrote:
< > mob now its pretty. _> There. |
In response to Fusioneko
|
|
Fusioneko wrote:
now its pretty. That code isn't pretty its flithy and the usr abuse is disgusting please learn to code before helping others. |
In response to Fusioneko
|
|
Dude, that code is nowhere near an improvement. It has the same useless stuff like those wasted if() blocks, the same wasted rand(1,1) calls, and on top of that you included pseudocode that won't compile.
It's nice when people help, but you didn't. Please don't post bad code in response to a situation where someone needs to learn to do it right. And if you're not sure you can do any better, that's usually a good sign that you probably have no help to offer. Lummox JR |
In response to Fusioneko
|
|
Tried to fix up as best as I can, didn't test but should work.
mob |
In response to Kore2
|
|
Kore2 wrote:
Tried to fix up as best as I can, didn't test but should work. And agian your wrong please don't reply to a code problem if you have NO idea what to do and its obvious that you have NO idea at all what your doing. |
In response to A.T.H.K
|
|
Hey ATHK, don't be so harsh. 'kay? All you've done in this thread is complain. Gosh.
|
In response to A.T.H.K
|
|
A.T.H.K wrote:
Kore2 wrote: I said tried, give some people a break, if you want to complain about when other people try to help then do it yourself, complaining about dm tags and usr abuse doesn't help. |
In response to Kore2
|
|
All those if() statements are bogus. Reason? If a mob is standing right in front of you, you won't hit him.
|
In response to Bustercannon
|
|
<b>mob |
In response to Destroior
|
|
ARGH please EDIT your post and apply the <*DM> tags and close the tag with <*/DM> both without the asterisk.
|
1
2