PDA

View Full Version : void OnCreate()Black Cat event



jjohn
06-20-2003, 02:54 AM
Here's an event designed to knock the wind out of players with very high luck. *For players with luck higher than 75, a visit from the black cat means losing a third of their luck.

Here's the code (minus the glue code needed in script_events.c).

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// file&#58; script/events/black_cat.c
void OnCreate&#40;&#41;
{
}

// If player has a luck score greater than 75, reduce it by a third.
void Main&#40;&#41;
{
*LogMsg&#40;&#34;Running black_cat event for &#036;st_my_name&#036;.&#34;&#41;;

*string p;
*string msg;
*string name = GetNameFromID&#40;i_my_id&#41;;
*int amount = 0;
*int c_luck = GetLuck&#40;i_my_id&#41;;
*int luck_threshold = 75;

*msg = *&#34;`yA fat, black cat saunters into the parlor. *&#34;;
*msg += &#34;Did you leave the front door open?&#92;n&#92;n&#34;;

*if &#40;c_luck &#62; luck_threshold&#41;
*{
* * c_luck /= 3;
* * amount -= c_luck;
* * ModLuck&#40;i_my_id, amount&#41;;
* * msg += &#34;The cat&#39;s bad luck rubs off on you&#33;&#92;n&#34;;
* * msg += &#34;You lose `w&#036;c_luck&#036;`y luck.&#34;;

* * LogMsg&#40;&#34;&#036;name&#036; lost &#036;c_luck&#036; luck from black cat&#34;&#41;;
*}

*p = AddCustom&#40;p, &#34;st_main&#34;, msg&#41;;
*p = AddCustom&#40;p, &#34;st_url&#34;, &#34;flash&#92;&#92;background&#92;&#92;background_2.swf&#34;&#41;;
*// p = AddCustom&#40;p, &#34;st_url&#34;, &#34;flash&#92;&#92;people&#92;&#92;&#34;&#41;;

main_menu&#58;
*p = AddButtonHome&#40;p, 1, &#34;Ok&#34;&#41;;
*SendPacketAndWait&#40;p&#41;;

*goto main_menu;
}

void OnKill&#40;&#41;
{
}
[/QUOTE]

What do you think? *Is this too harsh?

jjohn
06-20-2003, 02:56 AM
Wow... I hosed the topic with a badly placed paste&#33;

When clipboards attack&#33;

06-20-2003, 06:15 AM
Evil, I tell you&#33;

jjohn
06-20-2003, 03:24 PM
Quote[/b] (Guest @ June 20 2003,2:15)]Evil, I tell you&#33;

Yes, it is evil. *But once a player gets to 100 luck, it takes a whole gaggle of evil Yangs to knock his luck down. *This doesn&#39;t seem right to me. *Going from 90 to 60 isn&#39;t all that bad. *It puts some risk back into the game. *

Anyone else want to comment on this event?

If not, I&#39;ll start running it on Daisypark next week.

At the start of the next tournment, I&#39;m thinking about adding
a new item to Di-Mart for those that enjoy combat.

06-20-2003, 08:20 PM
An Axe?

Death of Rats
06-21-2003, 04:03 AM
*wields her Axe--purchased at the Di-Mart for 8 Gold Tags and a sexual favor* (Oh, com&#39;mon&#33; We all know the shop-keeper&#39;s damn sexy...) http://www.rtsoft.com/iB_html/non-cgi/emoticons/laugh.gif

A third is a bit much considering how difficult it is too get more luck in the first place unless you are playing team FQ. Perhaps just to knock it by ten or less would prove sufficient. Because if it&#39;s a random event like the twins and stuff... Welll, I usually get about three twins visits a night. (Frequency depends on server settings of course, and I&#39;m not sure of Daisypark&#39;s settings since I couldn&#39;t get it to work right for me.)

jjohn
06-22-2003, 01:29 AM
Quote[/b] (Death of Rats @ June 21 2003,12:03)]*wields her Axe--purchased at the Di-Mart for 8 Gold Tags and a sexual favor * (Oh, com&#39;mon&#33; We all know the shop-keeper&#39;s damn sexy...) http://www.rtsoft.com/iB_html/non-cgi/emoticons/laugh.gif


Sexy == middle aged gray retailer? Ya gots a phone number, DoR? http://www.rtsoft.com/iB_html/non-cgi/emoticons/laugh.gif


Quote[/b] ]
A third is a bit much considering how difficult it is too get more luck in the first place unless you are playing team FQ. Perhaps just to knock it by ten or less would prove sufficient. Because if it&#39;s a random event like the twins and stuff... Welll, I usually get about three twins visits a night. (Frequency depends on server settings of course, and I&#39;m not sure of Daisypark&#39;s settings since I couldn&#39;t get it to work right for me.)

I&#39;ve set scripted events to 0.08, just like the other events/risks.

Well, remember that the black cat doesn&#39;t affect players with luck below 75, so I think it won&#39;t be that bad.

redink1
06-22-2003, 02:12 AM
Hmm... it doesn&#39;t seem to harsh, and its a good idea.

jjohn
06-22-2003, 02:37 AM
Quote[/b] (redink1 @ June 21 2003,10:12)]Hmm... it doesn&#39;t seem to harsh, and its a good idea.

Thanks for the vote of confidence, redink1. *I&#39;ll roll up the mod into daisypark now. *If it sucks, it won&#39;t be the first idea I&#39;ve had for FQ that flew like a lead balloon.

jjohn
06-22-2003, 03:17 AM
BTW: *I don&#39;t have a graphic for the black cat. *Anyone who has flash want to make one?