ID:1341254
 
(See the best response by JunK Games.)
Code:
        KisameSharksNonhoming() // Verb used for firing the beam
set category = "Jutsu/Techniques"
set name = "Suiton - Sharks"
usr.Handseals()
if(usr.firing||usr.Kaiten) // If the mob's firing var is one...
return
if(usr.PK==20000)
usr<<"NON PK ZONE!"
return
if(!usr.handseals)
return
if(usr.Frozen)
usr<<"Your frozen"
return
if(usr.captured)
usr<<"Your captured"
return
if(usr.caught)
usr<<"Your captured"
return
if(usr.chakra <= 25)
usr<<"You dont have enough chakra!"
return
if(usr.froze)
usr<<"Your frozen"
return
if(usr.resting)
usr<<"Not while resting"
return
if(usr.meditating)
usr<<"Not while meditating"
return
if(!usr.handseals)
return
else // If the firing var isn't 1...
usr.verbs -= /mob/uchiha/verb/KisameSharksNonhoming
usr.DoryuuN += 1
usr.chakra -= 39
view()<<"<font size=1><font face=verdana><b><font color=white>[usr]<font color=green> Says: <FONT COLOR= red>Suiton - Sharks!</FONT>"
sleep(10)
usr.Chakragain()
if(usr.dir == NORTH)
var/obj/Kisameshark/A = new /obj/Kisameshark/
var/obj/Kisameshark/B = new /obj/Kisameshark/
var/obj/Kisameshark/C = new /obj/Kisameshark/
var/obj/Kisameshark/D = new /obj/Kisameshark/
var/obj/Kisameshark/E = new /obj/Kisameshark/
A.loc = locate(usr.x, usr.y+1, usr.z)
C.loc = locate(usr.x+1, usr.y+1, usr.z)
B.loc = locate(usr.x-1, usr.y+1, usr.z)
D.loc = locate(usr.x-2, usr.y+1, usr.z)
E.loc = locate(usr.x+2, usr.y+1, usr.z)
A.nin=usr.nin
B.nin=usr.nin
C.nin=usr.nin
D.nin=usr.nin
E.nin=usr.nin
A.Gowner=usr
B.Gowner=usr
C.Gowner=usr
D.Gowner=usr
E.Gowner=usr
A.dir = NORTH
B.dir = NORTH
C.dir = NORTH
D.dir = NORTH
E.dir = NORTH
walk(A,usr.dir)
walk(B,usr.dir)
walk(C,usr.dir)
walk(D,usr.dir)
walk(E,usr.dir)
sleep(400)
del(A)
del(B)
del(C)
del(D)
del(E)
sleep(10)
if(usr.dir == SOUTH)
var/obj/Kisameshark/A = new /obj/Kisameshark/
var/obj/Kisameshark/B = new /obj/Kisameshark/
var/obj/Kisameshark/C = new /obj/Kisameshark/
var/obj/Kisameshark/D = new /obj/Kisameshark/
var/obj/Kisameshark/E = new /obj/Kisameshark/
A.loc = locate(usr.x, usr.y-1, usr.z)
C.loc = locate(usr.x+1, usr.y-1, usr.z)
B.loc = locate(usr.x-1, usr.y-1, usr.z)
D.loc = locate(usr.x-2, usr.y-1, usr.z)
E.loc = locate(usr.x+2, usr.y-1, usr.z)
A.nin=usr.nin
B.nin=usr.nin
C.nin=usr.nin
D.nin=usr.nin
E.nin=usr.nin
A.Gowner=usr
B.Gowner=usr
C.Gowner=usr
D.Gowner=usr
E.Gowner=usr
A.dir = SOUTH
B.dir = SOUTH
C.dir = SOUTH
D.dir = SOUTH
E.dir = SOUTH
walk(A,usr.dir)
walk(B,usr.dir)
walk(C,usr.dir)
walk(D,usr.dir)
walk(E,usr.dir)
sleep(20)
del(A)
del(B)
del(C)
del(D)
del(E)
sleep(10)
if(usr.dir == WEST)
var/obj/Kisameshark/A = new /obj/Kisameshark/
var/obj/Kisameshark/B = new /obj/Kisameshark/
var/obj/Kisameshark/C = new /obj/Kisameshark/
var/obj/Kisameshark/D = new /obj/Kisameshark/
var/obj/Kisameshark/E = new /obj/Kisameshark/
A.loc = locate(usr.x-1, usr.y, usr.z)
C.loc = locate(usr.x-1, usr.y-1, usr.z)
B.loc = locate(usr.x-1, usr.y-2, usr.z)
D.loc = locate(usr.x-1, usr.y+1, usr.z)
E.loc = locate(usr.x-1, usr.y+2, usr.z)
A.nin=usr.nin
B.nin=usr.nin
C.nin=usr.nin
D.nin=usr.nin
E.nin=usr.nin
A.Gowner=usr
B.Gowner=usr
C.Gowner=usr
D.Gowner=usr
E.Gowner=usr
A.dir = WEST
B.dir = WEST
C.dir = WEST
D.dir = WEST
E.dir = WEST
walk(A,usr.dir)
walk(B,usr.dir)
walk(C,usr.dir)
walk(D,usr.dir)
walk(E,usr.dir)
sleep(20)
del(A)
del(B)
del(C)
del(D)
del(E)
sleep(20)
if(usr.dir == EAST)
var/obj/Kisameshark/A = new /obj/Kisameshark/
var/obj/Kisameshark/B = new /obj/Kisameshark/
var/obj/Kisameshark/C = new /obj/Kisameshark/
var/obj/Kisameshark/D = new /obj/Kisameshark/
var/obj/Kisameshark/E = new /obj/Kisameshark/
A.loc = locate(usr.x+1, usr.y, usr.z)
C.loc = locate(usr.x+1, usr.y-1, usr.z)
B.loc = locate(usr.x+1, usr.y-2, usr.z)
D.loc = locate(usr.x+1, usr.y+1, usr.z)
E.loc = locate(usr.x+1, usr.y+2, usr.z)
A.nin=usr.nin
B.nin=usr.nin
C.nin=usr.nin
D.nin=usr.nin
E.nin=usr.nin
A.Gowner=usr
B.Gowner=usr
C.Gowner=usr
D.Gowner=usr
E.Gowner=usr
A.dir = EAST
B.dir = EAST
C.dir = EAST
D.dir = EAST
E.dir = EAST
walk(A,usr.dir)
walk(B,usr.dir)
walk(C,usr.dir)
walk(D,usr.dir)
walk(E,usr.dir)
sleep(20)
del(A)
del(B)
del(C)
del(D)
del(E)
sleep(10)
usr.verbs += /mob/uchiha/verb/KisameSharksNonhoming
return
return

obj
Kisameshark
icon = 'Shark.dmi'
density = 1
Bump(A)
if(ismob(A))
var/mob/M = A
if(M.sphere)
return
if(M.counter)
del(src)
return
if(M.PK==0)
return
var/damage = round(src.nin)
if(damage >= 1)
M.health -= damage
view(M) << "[M] was hit by Suiton shark for [damage] damage!!"
var/mob/O = src.Gowner
M.Death(O)
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)


Problem description:
So here's my problem, I have this icon, and I'm awful at iconing so I can't split it up into parts to make it bigger, so it's one single icon. What I'm trying to do, is make that one icon, Shark.dmi, bigger than one tile, But I'm not sure how to change the pixels. That's all, thank you for your time! -Emily:).(P.S. I really don't want comments on other parts of the code that aren't "Up to date" or incorrect by others standards. Just simply how to change the icons pixels. Thank you!^^)
Best response
I don't see why you posted your code at all.
Simply change the icon size within the icon file.
Well, As I said in my post, I'm awful at iconing so I don't know how to icon it to make it bigger, and there isn't a way to do it without recreating the icon by drawing it so I'm trying to just change the pixels withing the source, but I need assistance in order to do that.
In response to Kyubikitsune
Kyubikitsune wrote:
Well, As I said in my post, I'm awful at iconing so I don't know how to icon it to make it bigger, and there isn't a way to do it without recreating the icon by drawing it so I'm trying to just change the pixels withing the source, but I need assistance in order to do that.

There is a proc to resize icons at runtime. Look up Scale().

This proc must be used on an icon object. So you'll have to get a reference to your shark's icon, then perform the scale on that, then assign the shark's icon to the new, bigger version.
And yes, I know you said you didn't want comments on the code you have, but I can't resist...lol My first advice is to get rid of everything that is redundant. If you find something being repeated many times, then there's probably a way to get rid of most of it, and just use it once. Here's your code, reorganized with the repeated stuff cut down (and yes, this will function the same as your existing code):

        KisameSharksNonhoming() // Verb used for firing the beam
set category = "Jutsu/Techniques"
set name = "Suiton - Sharks"
usr.Handseals()
if(usr.firing||usr.Kaiten||!usr.handseals)
return
if(usr.PK==20000)
usr<<"NON PK ZONE!"
return
if(usr.Frozen||usr.froze) //I'm confused why there's two vars used in your game that do the same thing?
usr<<"You're frozen"
return
if(usr.captured||usr.caught) //same here... I combined them (and the above ones) into a single check, since they both perform the same function with the same text output
usr<<"You're captured"
return
if(usr.chakra <= 25)
usr<<"You dont have enough chakra!"
return
if(usr.resting)
usr<<"Not while resting"
return
if(usr.meditating)
usr<<"Not while meditating"
return
usr.verbs -= /mob/uchiha/verb/KisameSharksNonhoming
usr.DoryuuN += 1
usr.chakra -= 39
view()<<"<font size=1><font face=verdana><b><font color=white>[usr]<font color=green>Says: <FONT COLOR= red>Suiton - Sharks!</FONT>"
sleep(10)
usr.Chakragain()
var/obj/Kisameshark/A = new /obj/Kisameshark/
var/obj/Kisameshark/B = new /obj/Kisameshark/
var/obj/Kisameshark/C = new /obj/Kisameshark/
var/obj/Kisameshark/D = new /obj/Kisameshark/
var/obj/Kisameshark/E = new /obj/Kisameshark/
//Now, here's where a lot could be removed. Since the only difference for each direction is in the starting location, but all other commands are the same, then all you need inside of the direction checks is the part that depends on the direction. the rest can all be moved out into a single set of lines.
A.dir = usr.dir
B.dir = usr.dir
C.dir = usr.dir
D.dir = usr.dir
E.dir = usr.dir
if(usr.dir == NORTH)
A.loc = locate(usr.x, usr.y+1, usr.z)
C.loc = locate(usr.x+1, usr.y+1, usr.z)
B.loc = locate(usr.x-1, usr.y+1, usr.z)
D.loc = locate(usr.x-2, usr.y+1, usr.z)
E.loc = locate(usr.x+2, usr.y+1, usr.z)
if(usr.dir == SOUTH)
A.loc = locate(usr.x, usr.y-1, usr.z)
C.loc = locate(usr.x+1, usr.y-1, usr.z)
B.loc = locate(usr.x-1, usr.y-1, usr.z)
D.loc = locate(usr.x-2, usr.y-1, usr.z)
E.loc = locate(usr.x+2, usr.y-1, usr.z)
if(usr.dir == WEST)
A.loc = locate(usr.x-1, usr.y, usr.z)
C.loc = locate(usr.x-1, usr.y-1, usr.z)
B.loc = locate(usr.x-1, usr.y-2, usr.z)
D.loc = locate(usr.x-1, usr.y+1, usr.z)
E.loc = locate(usr.x-1, usr.y+2, usr.z)
if(usr.dir == EAST)
A.loc = locate(usr.x+1, usr.y, usr.z)
C.loc = locate(usr.x+1, usr.y-1, usr.z)
B.loc = locate(usr.x+1, usr.y-2, usr.z)
D.loc = locate(usr.x+1, usr.y+1, usr.z)
E.loc = locate(usr.x+1, usr.y+2, usr.z)
A.nin=usr.nin
B.nin=usr.nin
C.nin=usr.nin
D.nin=usr.nin
E.nin=usr.nin
A.Gowner=usr
B.Gowner=usr
C.Gowner=usr
D.Gowner=usr
E.Gowner=usr
walk(A,usr.dir)
walk(B,usr.dir)
walk(C,usr.dir)
walk(D,usr.dir)
walk(E,usr.dir)
sleep(400)
del(A)
del(B)
del(C)
del(D)
del(E)
sleep(10)
usr.verbs += /mob/uchiha/verb/KisameSharksNonhoming
return

obj
Kisameshark
icon = 'Shark.dmi'
density = 1
Bump(A)
if(ismob(A))
var/mob/M = A
if(M.sphere||M.PK==0)
return
if(M.counter)
del(src)
return
var/damage = round(src.nin)
if(damage >= 1)
M.health -= damage
view(M) << "[M] was hit by Suiton shark for [damage] damage!!"
var/mob/O = src.Gowner
M.Death(O)
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)


And that's just for starters. There's a LOT more that could be done to cut this down even further. Remember, when people around here give out programming advice, it really is to help you out. Simpler and more compact code means code that is easier to navigate when troubleshooting for bugs.
Haha, thankyou for your comments and fixing my post. I only said I didn't want my code fixed because a lot of people will comment stuff like "Why is the so redundant only newbies do that" or "I hate when people who think they can code try to code" As if the only ones that can code are the experts that... started as a newbie.. ? It just doesn't make any sense. That's the only reason. But other than that, thankyou:). And I'll look into the scale()