okay i got two cogs. and since i am not the best cog writer they have some errors. the first one a lot of people have been having problems with. It is supposed to make an enemy be friendly. That cog doesn't print anything so it screws up near the begining.
here is my other cog. It is supposed to change your 3do every time u use it. This does absolutely nothing. I was pretty sure i had this one set up right. I think it might be going through the list though, since i have it end on ky.3do as well as start but i doubt it.
i hope someone can help me. I know it has nothing to do with my hotkeys. It has to be my horrible cogging.
Code:
# Han5678 Cog Script
#
# FORCE_CONVERT.COG
# Bin 116
#
# This script converts an enemy into a friendly.
#
# [Han5678]
#
# (C) 2001 Han5678 All Rights Reserved
symbols
thing player local
thing victim local
ai friend=frd.ai local
flex cost=100.0 local
flex mana local
message startup
message activated
message pulse
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
Return;
# ........................................................................................
pulse:
victim = FirstThingInView(player, 20 + 15 * rank, 2 + rank, 0x404);
while(victim != -1)
if(victim != -1)
{
jkSetTargetColors(6, 7, 8);
jkSetTarget(victim);
}
else
{
AiSetClass(victim,friend);
Print("It tastes good");
}
Return;
# ........................................................................................
activated:
if(IsInvActivated(player, 116)) Return;
mana = GetInv(player, 14);
if(mana >= cost)
{
SetInvActivated(player, 116, 1);
if(GetInv(player, 64) != 1) ChangeInv(player, 14, -cost);
rank = GetInv(player, 116);
Print("I like pizza");
}
Return;
endhere is my other cog. It is supposed to change your 3do every time u use it. This does absolutely nothing. I was pretty sure i had this one set up right. I think it might be going through the list though, since i have it end on ky.3do as well as start but i doubt it.
Code:
# Han5678 Cog Script
#
# ITEM_MODEL.COG
#
# [Han5678]
#
# (C) 2001 Han5678 All Rights Reserved
symbols
thing player local
model model1=ky.3do local
model model2=kyH4.3do local
model model3=kyA10.3do local
model model4=kyA12.3do local
model model5=kyA16.3do local
message activated
end
# ========================================================================================
code
activted:
player = GetSenderRef();
if(GetThingModel(player) == model1)
{
SetThingModel(player, model2);
}
else
if(GetThingModel(player) == model2)
{
SetThingModel(player, model3);
}
else
if(GetThingModel(player) == model3)
{
SetThingModel(player, model4);
}
else
if(GetThingModel(player) == model4)
{
SetThingModel(player, model5);
}
else
if(GetThingModel(player) == model5)
{
SetThingModel(player, model1);
}
return;
endi hope someone can help me. I know it has nothing to do with my hotkeys. It has to be my horrible cogging.
roses are red, violets are blue, I am schizophrenic, and I am too!