mob/npc
Brolli
name = "Broli (NPC)"
icon='mobs.dmi'
icon_state="brolli"
verb/Talk()
set src in oview(1)
set category="NPC"
if(usr.gotporattaearrings==0)
alert("I will give you Poratta Ear Rings, they can be used to fuse.")
usr.gotporattaearrings=1
usr<<"<I>You recieved poratta ear rings."
new/obj/poratta/earrings(usr)
else{usr<<"I already gave you poratta ear rings. Sorry.";return}
obj/poratta/earrings
icon='pottara.dmi'
name="Poratta Ear Rings"
verb
Wear()
set category="Utilities"
if(src.worn==1){src.worn=0;usr.overlays-='pottara.dmi';usr<<"You remove the [src.name]."}
else{src.worn=1;usr.overlays+='pottara.dmi';usr<<"You wear the [src.name]."}
Drop()
set category = "Utilities"
usr<<"You cannot drop Poratta Ear Rings, silly."
return
Fuse()
set category="Fight"
for(var/mob/M in oview(1))
if(usr.fused==1){usr<<"Your already fused.";return}
if(istype(M,/mob/npc)){usr<<"You can't fuse with that.";return}
else if(istype(M,/mob/player))
if(M.fused==1){usr<<"[M] is already fused.";return}
M.fvote=0
usr.fvote=0
switch(alert(M,"[usr] wishes to fuse with you. Do you wish to Accept or Decline?","Fusion","Accept","Decline"))
if("Accept")
usr<<"<B>[M] has accepted your offer to fuse."
M<<"<B>You accepted [usr]'s offer to fuse."
switch(alert(usr,"Who do you place your vote on, who should lead the fusion?","Fusion","You","[M]"))
if("You")
usr<<"<B>You voted for yourself!"
M<<"<B>[usr] voted for his/herself."
usr.fvote++
else
usr<<"<B>You voted [M]!"
M<<"<B>[usr] voted you."
M.fvote++
switch(alert(M,"Who do you place your vote on, who should lead the fusion?","Fusion","You","[usr]"))
if("You")
usr<<"<B>[M] voted for his/herself."
M<<"<B>You voted for yourself!"
M.fvote++
else
usr<<"<B>[M] voted you."
M<<"<B>You voted [usr]!"
usr.fvote++
if(usr.fvote==1&&M.fvote==1)
usr<<"<B>Vote Tally: 1 vote [usr]. 1 vote [M]."
M<<"<B>Vote Tally: 1 vote [usr]. 1 vote [M]."
usr<<"<B>The fusion was un-successfull due to a ie in votes. Please come to an agreement and try again."
M<<"<B>The fusion was un-successfull due to a ie in votes. Please come to an agreement and try again."
else if(usr.fvote==2)
M.oicon=M.icon
usr.oicon=usr.icon
usr<<"<B>Vote Tally: 2 votes [usr]. 0 votes [M]."
M<<"<B>Vote Tally: 2 votes [usr]. 0 votes [M]."
usr<<"<B>[usr] won the vote. He will be the leader of the fusion!"
M<<"<B>[usr] won the vote. He will be the leader of the fusion!"
view(10)<<"<B><U>~~~ [usr] and [M] fuse into one ~~~"
view(10)<<"<B><U>~~~ There power goes up ~~~"
M.icon='fused.dmi'
usr.contents+=M.contents
usr.overlays+=M.overlays
M.fused=1
usr.fused=1
M.overlays=0
M.loc=locate(usr.x,usr.y,usr.z)
usr.overlays=0
usr.overlays+='fused_hair.dmi'
for(var/obj/I in contents)
I.worn=0
M.follow = usr.name
M.fusionfollow()
else if(M.fvote==2)
usr.oicon=M.icon
M.oicon=usr.icon
M<<"<B>Vote Tally: 2 votes [usr]. 0 votes [M]."
usr<<"<B>Vote Tally: 2 votes [usr]. 0 votes [M]."
M<<"<B>[usr] won the vote. He will be the leader of the fusion!"
usr<<"<B>[usr] won the vote. He will be the leader of the fusion!"
view(10)<<"<B><U>~~~ [usr] and [M] fuse into one ~~~"
view(10)<<"<B><U>~~~ There power goes up ~~~"
usr.icon='fused.dmi'
M.contents+=M.contents
M.overlays+=M.overlays
usr.fused=1
M.fused=1
usr.overlays=0
usr.loc=locate(usr.x,usr.y,usr.z)
M.overlays=0
M.overlays+='fused_hair.dmi'
for(var/obj/I in contents)
I.worn=0
usr.follow = usr.name
usr.fusionfollow()
if("Decline")
usr<<"<B>[M] declined your offer to fuse with him."
M<<"<B>You declined [usr]'s offer to fuse."
return
else{usr<<"You can't fuse with that.";return}
Un_Fuse()
set category="Fight"
for(var/mob/M in world)
if(M.follow==usr.name)
M.follow=""
usr.fused=0
M.fused=0
usr.overlays=0
usr<<"<B>The fuse was broken."
M<<"<B>The fuse was broken."
M.icon=M.oicon
for(var/obj/I in usr.contents)I.worn=0
for(var/obj/A in M.contents)A.worn=0
mob/proc/fusionfollow()
for(var/mob/player/M in world)
if(src.follow == usr.name)
if(!src){return}
if(src==null)return
src.loc = usr.loc
sleep(1)
src.fusionfollow()
else ..()
client
Move()
for(var/mob/player/M in world)
if(usr.follow==M.name){return}
else ..()
.=..()
Problem description:
the errors i have are liek undefined var so how would i define a var errors are this.
test.dm:30:error:usr.fused:undefined var
test.dm:33:error:M.fused:undefined var
test.dm:34:error:M.fvote:undefined var
test.dm:35:error:usr.fvote:undefined var
test.dm:44:error:usr.fvote:undefined var
test.dm:48:error:M.fvote:undefined var
test.dm:53:error:M.fvote:undefined var
test.dm:57:error:usr.fvote:undefined var
test.dm:58:error:usr.fvote:undefined var
test.dm:58:error:M.fvote:undefined var
test.dm:63:error:usr.fvote:undefined var
test.dm:64:error:M.oicon:undefined var
test.dm:65:error:usr.oicon:undefined var
test.dm:75:error:M.fused:undefined var
test.dm:76:error:usr.fused:undefined var
test.dm:83:error:M.follow:undefined var
test.dm:85:error:M.fvote:undefined var
test.dm:86:error:usr.oicon:undefined var
test.dm:87:error:M.oicon:undefined var
test.dm:97:error:usr.fused:undefined var
test.dm:98:error:M.fused:undefined var
test.dm:105:error:usr.follow:undefined var
test.dm:115:error:M.follow:undefined var
test.dm:116:error:M.follow:undefined var
test.dm:117:error:usr.fused:undefined var
test.dm:118:error:M.fused:undefined var
test.dm:122:error:M.oicon:undefined var
test.dm:137:error:usr.follow:undefined var
test.dm:127:error:src.follow:undefined var
test.dm:9:error:usr.gotporattaearrings:undefined var
test.dm:11:error:usr.gotporattaearrings:undefined var
test.dm:6:error:Talk :duplicate definition
menus.dm:1015:error:Talk :previous definition
test.dm:21:error:src.worn:undefined var
test.dm:21:error:src.worn:undefined var
test.dm:22:error:src.worn:undefined var
test.dm:82:error:I.worn:undefined var
test.dm:104:error:I.worn:undefined var
test.dm:123:error:I.worn:undefined var
test.dm:124:error:A.worn:undefined var