rist
New Member
Posts: 15
|
Post by rist on Feb 3, 2019 20:03:38 GMT
Not sure if this has been asked for but /support would be so convenient. Saves alot of time from having to hand stones over to the MT or Pots to an Alch.
|
|
zage
New Member
Posts: 31
|
Post by zage on Feb 3, 2019 20:27:38 GMT
Dont think it was a thing in old world.
|
|
rist
New Member
Posts: 15
|
Post by rist on Feb 3, 2019 20:30:48 GMT
Nope it was introduced in A3res I believe.
|
|
hello
New Member
Posts: 37
|
Post by hello on Feb 4, 2019 11:12:00 GMT
Yeah the 3.5 code was pretty much copy/pasted without much difficulty. Also note that in A3Res trader gave 11 bart bonus per profession point, enabling you to support and give max price with 1 bart base. Anyways here is the code.
// server.h character
int supporting;
int supported;
// command.c somewhere in command() if ((len=cmdcmp(ptr,"support",3))) {
ptr+=len; while (isspace(*ptr)) ptr++;
cmd_support(cn,ptr);
return 1;
}
// command.c static int cmd_support(int cn,char *ptr) // 1=OK, 0=repeat
{
char name[80];
int n,co,cc;
for (n=0; isalpha(*ptr) && n<79; name[n++]=*ptr++) ;
name[n]=0;
if (n<2) {
co=ch[cn].supporting;
if (co && !(ch[co].flags&CF_PLAYER)) co=0;
if (co && ch[co].supported!=cn) co=0;
if (co) log_char(cn,LOG_SYSTEM,0,"You are supporting %s.",ch[co].name);
else log_char(cn,LOG_SYSTEM,0,"You are not supporting anybody.");
co=ch[cn].supported;
if (co && !(ch[co].flags&CF_PLAYER)) co=0;
if (co && ch[co].supporting!=cn) co=0;
if (co) {
log_char(cn,LOG_SYSTEM,0,"%s is supporting you:",ch[co].name);
log_char(cn,LOG_SYSTEM,0,"Trader at %d.",ch[co].prof[P_TRADER]);
log_char(cn,LOG_SYSTEM,0,"Alchemist at %d.",ch[co].prof[P_ALCHEMIST]);
} else log_char(cn,LOG_SYSTEM,0,"No one supports you.");
return 1;
}
for (co=getfirst_char(); co; co=getnext_char(co)) {
if (!strcasecmp(name,ch[co].name)) break;
}
if (!co) {
log_char(cn,LOG_SYSTEM,0,"Sorry, no one by the name %s around.",name);
return 1;
}
if (cn==co) {
log_char(cn,LOG_SYSTEM,0,"Clever. Really clever. Not gonna work, though.");
return 1;
}
if (ch[co].supported) {
log_char(cn,LOG_SYSTEM,0,"%s is already getting supported.",ch[co].name);
return 1;
}
if ((cc=ch[cn].supporting)) {
if (cc>0 && cc<MAXCHARS && (ch[cc].flags&CF_PLAYER) && ch[cc].supported==cn) {
log_char(cc,LOG_SYSTEM,0,"%s is no longer supporting you.",ch[cn].name);
ch[cc].supported=0;
}
}
if (ignoring(co,ch[cn].ID)) {
log_char(cn,LOG_SYSTEM,0,"%s is ignoring you.",ch[co].name);
return 1;
}
ch[cn].supporting=co;
ch[co].supported=cn;
log_char(cn,LOG_SYSTEM,0,"You are now supporting %s.",ch[co].name);
log_char(co,LOG_SYSTEM,0,"%s is supporting you:",ch[cn].name);
log_char(co,LOG_SYSTEM,0,"Trader at %d.",ch[cn].prof[P_TRADER]);
log_char(co,LOG_SYSTEM,0,"Alchemist at %d.",ch[cn].prof[P_ALCHEMIST]);
return 1;
}
|
|
rist
New Member
Posts: 15
|
Post by rist on Feb 5, 2019 4:11:30 GMT
my hero
|
|
rist
New Member
Posts: 15
|
Post by rist on Feb 13, 2019 0:34:35 GMT
Womp Horo said this code isn't compatible
|
|
hello
New Member
Posts: 37
|
Post by hello on Feb 13, 2019 10:25:33 GMT
Just make it compatible horo jesus. Spawn alts in africa are starving because they can't buy pots.
|
|
|
Post by Cristine on Jan 26, 2021 20:51:48 GMT
|
|