ID:273813
 
Hey guys I just wanted to ask 2 questions

1st and most important how would you make a fusion code?
To specifie what i want is that you play an animation with flick one person going right the other left and a sound going fusion ha. Then the stats of both players are combined and multiplied like 5 times. Their power lvls have to be exact and that there would be a chance of failure in the fusion where you would turn into the fat dude.the fusion would last for 5 minutes

2nd i would like for admins only to give a GM buff to all players online so they would receive like 100% more xp and like 50% more strenght amd attack to help them level up


I know this is asking for much but on fusion I dont even have a clue on the buff i do but just making sure anyway thanks to anyone who helped me so far and will help me thanks to all
Any one can answer this??????
PLS
mob/verb/Fusion()
for(var/mob/M in get_step(src,src.dir))
switch(input("[src] would like to fuse with you.","Fusion") in list ("Fuse!","Decline"))
if("Fuse!")
if(src.PL==M.PL)//if the Person initiating this verb has a PL equal to the other person then it will continue..
src.loc=locate(M.x,M.y-1,M.z)//M.y-1 = the second users y loc minus one. so the first guy appears next to him.
flick(M,"Fusion on Right") // This person will be on the right moving into the left
flick(src,"Fusion on Left") // This person will be on the left moving into the right
//Though, you will have to icon these yourself
view(src) << sound('fusion.mid')//NOTE THE MUSIC FILE WILL GIVE YOU AN ERROR IF THE FILE IS NOT IN YOUR GAME FOLDER//This is the sound that will play. Youll have to find the sound yourself
var/name1="[M.name]" //Temporary second name for the second guy
if(length(name1)<=7) //If their name is longer than 7...
name1=rand(5,7) //Their name length will be between 5 and 7
var/name2="[src.name]"//Temporary second name for the first guy
if(length(name2)<=7)
name2=rand(5,7)
src.name="[name1][name2]" //Adds their names together
M.client.eye = src
M.prevlocx=M.x //These save the src's Location incase they log out.
M.prevlocy=M.y
M.prevlocz=M.z
M.Fused=1
M.loc=locate(0,0,0)// sends them to a place nobody can get to or see.. the no zone :)
src.icon_state="Fused"//Changes the first guys icon state to their fused state. you should make this too.
src.PL=src.PL*10+M.PL
else
view(src) << "[src] and [M]. Your powerlevels must be equal!"
return
if("Decline")
src << "[M] has decline your offer to fuse."
return

mob/proc/EndFusion()
if(src.Partner!="") //if their partner var DOESNT equal "" then it runs because the first guy never had his var changed.
src.x=src.prevlocx
src.y=src.prevlocy
src.z=src.prevlocz
src.Fused=0
src.Partner=""
src.client.view=src
else
src.Fused=0
src.PL=src.maxPL


mob/Logout() // You'll need to add these in your logout code
if(Fused)
src.x=src.prevlocx
src.y=src.prevlocy
src.z=src.prevlocz
src.Fused=0
src.Partner=""
src.client.view=src
for(var/mob/M in world)
if(M.key==src.Partner)
M << "Your partner, [src], has logged out. Your fusion has ended,"
M.EndFusion()

mob/var
Fused=0
prevlocx=0
prevlocy=0
prevlocz=0
PL=1000
maxPL=1000
Partner=""


Eww.. it took me about 15 mins D:.. Hey, if there are any bugs, tell me. I got really tired and kinda confused because I had no Icon/Sound Resources so I could not test it. Therefore it made it hard on me since I had to make my own game in my mind and memorize everything. Good luck!
In response to Xirre
I haven't looked through it fully, but you know in verbs, you don't need src. if you are referring to the caller, right?
ex:
mob
var{cake;pie;sugar}
verb/beep()
src.cake="The Best!"
src.pie="Nasty"
src.sugar=src.cake

is the exact same as
mob
var{cake;pie;sugar}
verb/beep()
cake="The Best!"
pie="Nasty"
sugar=cake

The second whoever, reduces the dm file size. :3