ID:262356
 
Code:
obj/dragonballs/earth1
icon = 'dragonball.dmi'
icon_state = "1"
verb
Get()
set category = "Inventory"
set src in oview(0)
Move(usr)
if (usr.gotdb1==0)
set src in oview(0)
usr.gotdb1=1
checkdbz()
src.loc = locate(0,0,0)
sleep(3000)
var/x = rand(1,150)
var/y = rand(1,150)
src.loc = locate(x,y,1)
else
usr<< "You have this one already"
obj/dragonballs/earth2
icon = 'dragonball.dmi'
icon_state = "2"
verb
Get()
set category = "Inventory"
set src in oview(0)
Move(usr)
if (usr.gotdb2==0)
set src in oview(0)
usr.gotdb2=1
checkdbz()
src.loc = locate(0,0,0)
sleep(3000)
var/x = rand(1,150)
var/y = rand(1,150)
src.loc = locate(x,y,1)
else
usr<< "You have this one already"
obj/dragonballs/earth3
icon = 'dragonball.dmi'
icon_state = "3"
verb
Get()
set category = "Inventory"
set src in oview(0)
Move(usr)
if (usr.gotdb3==0)
set src in oview(0)
usr.gotdb3=1
checkdbz()
src.loc = locate(0,0,0)
sleep(3000)
var/x = rand(1,150)
var/y = rand(1,150)
src.loc = locate(x,y,1)
else
usr<< "You have this one already"
obj/dragonballs/earth4
icon = 'dragonball.dmi'
icon_state = "4"
verb
Get()
set category = "Inventory"
set src in oview(0)
Move(usr)
if (usr.gotdb4==0)
set src in oview(0)
usr.gotdb4=1
checkdbz()
src.loc = locate(0,0,0)
sleep(3000)
var/x = rand(1,150)
var/y = rand(1,150)
src.loc = locate(x,y,1)
else
usr<< "You have this one already"
obj/dragonballs/earth5
icon = 'dragonball.dmi'
icon_state = "5"
verb
Get()
set category = "Inventory"
set src in oview(0)
Move(usr)
if (usr.gotdb5==0)
set src in oview(0)
usr.gotdb5=1
checkdbz()
src.loc = locate(0,0,0)
sleep(3000)
var/x = rand(1,150)
var/y = rand(1,150)
src.loc = locate(x,y,1)
else
usr<< "You have this one already"
obj/dragonballs/earth6
icon = 'dragonball.dmi'
icon_state = "6"
verb
Get()
set category = "Inventory"
set src in oview(0)
Move(usr)
if (usr.gotdb6==0)
set src in oview(0)
usr.gotdb6=1
checkdbz()
src.loc = locate(0,0,0)
sleep(3000)
var/x = rand(1,150)
var/y = rand(1,150)
src.loc = locate(x,y,1)
else
usr<< "You have this one already"
obj/dragonballs/earth7
icon = 'dragonball.dmi'
icon_state = "7"
verb
Get()
set category = "Inventory"
set src in oview(0)
Move(usr)
if (usr.gotdb7==0)
set src in oview(0)
usr.gotdb7=1
checkdbz()
src.loc = locate(0,0,0)
sleep(3000)
var/x = rand(1,150)
var/y = rand(1,150)
src.loc = locate(x,y,1)
else
usr<< "You have this one already"

proc/checkdbz()
usr.earthballs= (usr.gotdb1+usr.gotdb2+usr.gotdb3+usr.gotdb4+usr.gotdb5+usr.gotdb6+usr.gotdb7)
if(usr.gotdb1==1 && usr.gotdb2==1 && usr.gotdb3==1 && usr.gotdb4==1 && usr.gotdb5==1 && usr.gotdb6==1 && usr.gotdb7==1 && usr.haswished==0)
usr.verbs += /mob/dbz/verb/Summon_Shenlong
else
usr.verbs-= /mob/dbz/verb/Summon_Shenlong

mob/dbz/verb
Summon_Shenlong()
usr.verbs -= /mob/dbz/verb/Summon_Shenlong
usr.random = 1
dostuff
if(usr.random == 0)
usr << "Your Wish Has Been Granted..."
usr.gotdb1=0
usr.gotdb2=0
usr.gotdb3=0
usr.gotdb4=0
usr.gotdb5=0
usr.gotdb6=0
usr.gotdb7=0
usr.earthballs=0
haswished=1
return
else
usr.random -= 1
switch(input("What will your wish be?") in list("Power","Ki","Strenght","Defense","Speed","Coin","Zenni","Restore World","Kill Someone","Revive Someone","Alignment Good","Alignment Evil","Go to Kao-shins Planet"))
if("Power")
usr.maxpowerlevel=usr.maxpowerlevel*1.1
usr << "<b>You sense your power increasing greatly!"
if("Ki")
usr.MaxKi=usr.MaxKi*1.1
usr << "<b>You sense your ki increasing greatly!"
if("Strenght")
usr.str=usr.str*1.1
usr << "<b>You sense your strenght increasing greatly!"
if("Defense")
usr.def=usr.def*1.1
usr << "<b>You sense your defense increasing greatly!"
if("Speed")
usr.speed=usr.speed*1.1
usr << "<b>You sense your Speed increasing greatly!"
if("Coin")
usr.zenni += 1000
usr << "<b>A pile of coin falls on you."
usr << "<b>You got 10,000 coin!"
if("Zenni")
usr.zenni += 100000
usr << "<b>A pile of zenni falls on you."
usr << "<b>You got 100,000 zenni!"
if("Alignment Good")
usr.alignment = "Good"
usr << "<b>You felt the hand of god as you turned pure!"
if("Alignment Evil")
usr.alignment = "Evil"
usr << "<b>You felt the hand of the devil as you turned pure evil!"
if ("Go to Kao-shins Planet")
usr.loc=locate(77,77,1)
if("Restore World")
for(var/mob/M in world)
M << "<b><font color= Aqua>A bright light shines from above as you feel regenerated!"
M.powerlevel = M.maxpowerlevel
M.Ki = M.MaxKi
M.stamina = M.maxstamina
if("Kill Someone")
var/alreadykilled = 0
for(var/mob/M in world)
if(M.key)
if(M.Police == 0||M.Police2==1||M.Police3==1||M.Police4==1||M.Police == null)
if(alreadykilled == 0)
switch(alert(usr,"Do you wish to let [M] be killed?","Confirmation","Yes","No"))
if("Yes")
M.powerlevel = 0
M.Die()
alreadykilled = 1
if("Revive Someone")
var/alreadyrevived = 0
for(var/mob/M in world)
if(M.key)
if(M.Police == 0||M.Police == null)
if(M.Owner == 0||M.Owner == null)
if(alreadyrevived == 0)
switch(alert(usr,"Do you wish to let [M] be revived?","Confirmation","Yes","No"))
if("Yes")
if(M.dead == 1)
M.powerlevel = M.maxpowerlevel
M.Ki = M.MaxKi
M.stamina = M.maxstamina
M.dead = 0
M.overlays -= /obj/halo
M.overlays -= 'halo.dmi'
M.overlays -= /obj/halo
M.overlays -= 'halo.dmi'
M.overlays -= /obj/halo
M.overlays -= 'halo.dmi'
M.loc=locate(77,77,1)
alreadyrevived = 1
else
usr << "[M] is already alive."
goto dostuff


Problem description:
Ok here is what the problem is, when i log in and get the dragonballs EX: if i only get the 2,3,7 balls and go in for a 3 or 2 or 7 bals it said you got it alraedy and i put it up again and when i collect a 7 on them it don't work it only work for when i log in the frist time and colloect all seven if you log out and go in back you wouldn't be able to wish even if you get all seven dragonballs.
Can anyone help me please.
Ok as alot of people will tell you. Its been a very very long time since ive even looked at code. But i think your probelem is There is no saving code. I refer you to
http://developer.byond.com/hub/Deadron/CharacterSaving

This is a very good saving tutorial By Deadron. Look through it and adept it to your game. Dont just copy and paste it Read it Each line if you dont know what something does find out. This way you can learn and figure it out yourself.
In response to Cloud54367
ammm that does not HELP.
HELP ANYONE I NEED THIS WHY ISN"T IT WORKING
In response to Sayian Hunter
Sayian Hunter wrote:
ammm that does not HELP.
HELP ANYONE I NEED THIS WHY ISN"T IT WORKING


Where are you telling it to save?
In response to Hell Ramen
i want it so it save anywhere and so that you will be able to log in a call the dragon after collecting all 7 dragonball
In response to Sayian Hunter
Sayian Hunter wrote:
i want it so it save anywhere and so that you will be able to log in a call the dragon after collecting all 7 dragonball

You're not telling it to save anywhere, so it's not DM's fault. This belongs in Newbie Central. =/

Anyways, use Deadron's Character Handling, and ditch Zeta.
In response to Hell Ramen
CAN'T YA PEOPLE READ I SAID THE PROBLEM IS THIS

Ok here is what the problem is, when i log in and get the dragonballs EX: if i only get the 2,3,7 balls and go in for a 3 or 2 or 7 bals it said you got it alraedy and i put it up again and when i collect a 7 on them it don't work it only work for when i log in the frist time and colloect all seven if you log out and go in back you wouldn't be able to wish even if you get all seven dragonballs.
Can anyone help me please.

HOW THE HELL I SUPPOSE TO KNOW HIS THAT WHY I PUT IT HERE IN THE FREIST PLACE
In response to Sayian Hunter
Sayian Hunter wrote:
CAN'T YA PEOPLE READ I SAID THE PROBLEM IS THIS

Ok here is what the problem is, when i log in and get the dragonballs EX: if i only get the 2,3,7 balls and go in for a 3 or 2 or 7 bals it said you got it alraedy and i put it up again and when i collect a 7 on them it don't work it only work for when i log in the frist time and colloect all seven if you log out and go in back you wouldn't be able to wish even if you get all seven dragonballs.
Can anyone help me please.

HOW THE HELL I SUPPOSE TO KNOW HIS THAT WHY I PUT IT HERE IN THE FREIST PLACE

Please use actual words, and I don't understand a lot of your post.
In response to Digitalgohan321
Ahhhhh fug that nevermind Thanks anyway fo trying, ok here is something easier.
Code:
        Die()
if(src.powerlevel <= 0)
if(src.immortal==1||src.immortal==null)
src<<"<b><font size = 2><FONT FACE=Arial COLOR=#E6E1CA>You feel like you're about to die, but then your wounds began healing by the power of <b><FONT FACE=Arial COLOR=#FF6531>Immortality<font color= Red></u>..."
src.KO()
else
if(istype(src,/mob/monsters/General_Tao))
if(src.powerlevel <= 0)
usr.completelist = "Complete"
src.movable = 0
src.density = 0
src.icon = 'Blood.dmi'
usr.zenni += rand(1,50)
usr.death += 1
world << "<font color = White><b>[usr] just defeated the great General Tao!"
sleep(50)
src.loc=locate(0,0,0)
sleep(1000)
var/gar = /mob/monsters/Garlic_Jr
new gar(locate(77,55,1))
del(src)


Problem description:
Can you code a better version fo this coding.
Please and Thank You
In response to Sayian Hunter
Indentation problem, Saiyan Hunter, Die() needs to be indented by one less, otherwise 'if(src.powerlevel <= 0)' is never checked, and the entire proc is in another proc's dirty little hands. =P

Like so:

    Die()
if(src.powerlevel <= 0)


EDIT: to make this snippet smaller, a simple change could be...

var/gar = new /mob/monsters/Garlic_Jr (locate(77,55,1))