EOSERV Forum > EO Server Building > feeling headstrong but need help
Page: << 1 2 >>
feeling headstrong but need help
Author Message
Post #202259 Re: feeling headstrong but need help

You can't pass multiple items through the IsWearing check. If you want to do that you'll have to modify your IsWearing rule in quest.cpp

I haven't tested this yet, but it should work.


int result;

std::string expr_string = std::string(expr.args);

if(expr_string.find(","))

{

char *f = strtok(expr.args[0], ",");

while (f) 

{

   if(std::find(UTIL_CRANGE(this->character->paperdoll), int(f)) != this->character->paperdoll.end())

    {

          result = 1;

    }

    else

    {

          result = 0;

    }

   f = strtok(NULL, " ");

}

return result;

}

else

{

return std::find(UTIL_CRANGE(this->character->paperdoll), int(expr.args[0])) != this->character->paperdoll.end();

}

---
stay tuned.
7 years, 13 weeks ago
Post #202261 Re: feeling headstrong but need help

Thanks Andrew but I have no clue what to do with that info if everyone hasn't nocticed I don't really know what I'm doin I'm probably the most annoying guy on here ive been trying to make a game for like 5 weeks ive completely crashed 3 games so far like bugged had to delete them an restart loll sucked ive put some some many hours shoot days into making a game I'm on my fourth game so far an ive had this one the longest cause I've learned a lot thanks to all you guys I'm hopeing that making a server doesn't/hasn't come easy to anyone but I'm sure it has but I really do enjoy trying to do this I don't feel at all like ive wasted my time this may sound dumb to you guys but I really want to go to school now for paint mode so I can pixel better well I think its just cause I don't know how to use graphics gale so many different things you can in that program the funny thing is I'm only on map 2 of my game haha trying to balance it an find the right items for crafts adding stats adding npc stats is a challenge but I'm not goin to bored yall with my problems anymore Thanks everyone for the help

7 years, 13 weeks ago
Post #202262 Re: feeling headstrong but need help
andrewbob1 posted: (26th Jan 2017, 09:15 pm)

You can't pass multiple items through the IsWearing check. If you want to do that you'll have to modify your IsWearing rule in quest.cpp

I haven't tested this yet, but it should work.


int result;

std::string expr_string = std::string(expr.args);

if(expr_string.find(","))

{

char *f = strtok(expr.args[0], ",");

while (f) 

{

   if(std::find(UTIL_CRANGE(this->character->paperdoll), int(f)) != this->character->paperdoll.end())

    {

          result = 1;

    }

    else

    {

          result = 0;

    }

   f = strtok(NULL, " ");

}

return result;

}

else

{

return std::find(UTIL_CRANGE(this->character->paperdoll), int(expr.args[0])) != this->character->paperdoll.end();

}


He's using EOSource.

@Plako you'll have to possibly post in the forum over at eosource.net, the code posted above would have to be added, as EOSource is closed source.


Closed source

From Wikipedia, the free encyclopedia

Closed source (or proprietary software) means computer programs whose source code is not published. The source code is not shared with the public for anyone to look at or change.

7 years, 13 weeks ago
Page: << 1 2 >>

EOSERV Forum > EO Server Building > feeling headstrong but need help