ZiRo 0 Posted April 29, 2004 I really don't know where this would belong but its a great laugh. Add here scripts you make about real life, this can be about anything. I'll start us off. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;- banghead.sqs ;----------------------- _man = _this select 0 ;- start #banghead ;- play banghead anim _man switchmove "FXbanghead" ;- wait 0.5 (to stop ofp freeze/ctd) ~0.5 ;- check if to stop banging head - if not goto "banghead" ?!bangheadstop: goto "banghead" ;- exit exit <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;- SchoolGrades.sqs ;--------------------- _man = _this select 0 _school = _this select 1 ;- Grades array _goodgrades = [science, maths, english] _pay = _goodgrades - 5 _i = 1 ;- start #parents ;- check grades - consiquences ?(count _goodgrades) < 5:_man setdamage 1;bomb = "b61nuke5kt" camcreate [getpos _school select 0, getpos _school select 1, (getpos _school select 2) +400] ;- if grades are good goto "goodboy" ?(count _goodgrades) > 5:goto "goodboy" ;- wait to stop freeze/ctd ~1 ;- loop goto "parents" #goodboy ;- add money _man addrating 40 ;- make sure correct amount - exit if money given _i = _i + 1 ?_i == _pay:exit ;- wait to avoid ctd/freeze ~1 ;- loop goto "goodboy" Corrections/Adaptions are permitted :P Hope people submit :P -ZiRo Share this post Link to post Share on other sites
MrZig 0 Posted April 30, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _man = _this select 0 _age = _this select 1 _risk = 40 _count = 0 #init ?_age >65 : _risk = _risk + 30 #heart ~1 heart _man playmove "pump" _risk = _risk + random .2 _r = random 100 ?_r < _risk : goto "diemaybe" goto "heart" #diemaybe ~5 ?electricshock : goto "maybe" _count = _count + 1 ?_count == 200 - _risk : goto "die" goto "diemaybe" #maybe _r = random 2 ?_r <=1 : goto "heart" ?_r >= : goto "die" #die _man setdammage 1 exit lol Share this post Link to post Share on other sites
Migebuff 0 Posted April 30, 2004 #spam ? admin distance spammer <= 5: postcount = 0; deletevehicle topic; Exit postcount = postcount + 1 publicvariable "postcount" goto "spam" Share this post Link to post Share on other sites
void_false 1 Posted April 30, 2004 to put nuke on the school is my dream Share this post Link to post Share on other sites
Blanco 0 Posted April 30, 2004 you guys are freaks, Very amusing Share this post Link to post Share on other sites
ZiRo 0 Posted April 30, 2004 Migebuff: your life would freeze or ctd if you scripted it. Quote[/b] ]#spam? admin distance spammer <= 5: postcount = 0; deletevehicle topic; Exit postcount = postcount + 1 publicvariable "postcount" goto "spam" Wheres your ~ you stupid useless pathetic script monkey? :P <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#spam ? admin distance spammer <= 5: postcount = 0; deletevehicle topic; Exit postcount = postcount + 1 publicvariable "postcount" ~1 goto "spam" There - fixed. Now live in a freeze/ctd free life of spamming. And we may be sad but when we have to reprogram the matrix - you'll thank us. -ZiRo Share this post Link to post Share on other sites
MrZig 0 Posted April 30, 2004 If you have no ~1 Then it will just be harder on your framerates, nothing else I don't think. Well maybe if you had like 20 CONSTANT loops going, you might not have enough resources and ctd.. Share this post Link to post Share on other sites
hellfish6 7 Posted April 30, 2004 This could probably be construed as off topic, but since I'm in a really good mood, I'll keep it open, but move it to Offtopic. Let's keep this place a repository of discovery and insight. Share this post Link to post Share on other sites
MrZig 0 Posted May 1, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _mod = _this select 0 _topic = _this select 1 _mean = false ?name _mod == Hellfish6 : _mean = true ?name _mod == placebo : _exit = true #main ?_exit : closetopic _topic;exit _r = random 100 ?mean && _r >99 : _open = true ?!mean && _r >50 : _open = true ?_open : goto "chat" closetopic _topic exit #chat _mod globalchat "Because I'm not a really mean mod, or the random was above 99, I'm keeping this open;)" exit LOL jk man :P Share this post Link to post Share on other sites
hellfish6 7 Posted May 1, 2004 Yeah, like I have any idea what you're talking about. Share this post Link to post Share on other sites
ralphwiggum 6 Posted May 1, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_thread = _this select 0 _poster = _this select 1 ?(_thread == "useless" || _thread == "spam" || _thread == "flame"):goto "exitcond" ?(_thread == "useful"):goto "nextThread" #exitcond ?(behaviour _poster == "combat"): _poster setPR true ?(behaviour _poster == "aware"): _poster setWarning true #nextThread exit Share this post Link to post Share on other sites
somebloke 0 Posted May 1, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_youguys = Busted Share this post Link to post Share on other sites
ZiRo 0 Posted May 1, 2004 Well to be fair: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _forum = [OffTopic, Mission Editing & Scripting] _random = random (count _forum) ?_random > 1:[scripting real life] exec "missioneditingforum.sqs";exit ?_random < 2:[scripting real life] exec "OffTopicforum.sqs";exit Share this post Link to post Share on other sites
Skul 0 Posted May 1, 2004 As I have little experience with variables and some other stuff, this may cause a CTD and 50 errors... Anyway, it's not serious, is it? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _bossguy = placebo _mrlovable = Skul _skulrival = SpeedyDonkey _votes = vipvotes _skulvotes = Skul's quirkiest member votes _sdvotes = SpeedyDonkey's quirkiest member votes _bossguy count _votes IF _skulvotes => _sdvotes THEN _mrlovable addweapon "quirkiestmemberaward" ELSE _skulrival addweapon "quirkiestmemberaward" ~1 goto "makeskulpissed" #makeskulpissed (count (weapons _skulrival ) > 1) IF weapons _skulrival = 1 THEN goto "revenge" #revenge _mrlovable addmagazine "M16" _mrlovable addweapon "M16" ~2 _mrlovable dotarget _skulrival ~1 _mrlovable dofire _skulrival ~2 IF (NOT alive _skulrival) THEN goto "banned" ELSE goto "revenge" #banned _bossguy globalchat "Killing other forum members is not allowed, Skul. You're perm banned." ~5 deletevehicle _mrlovable ~1 goto "asktheguru" #asktheguru _guru = GARGAT Guru _mrlovable globalchat "Guru, how can I get back onto the forums?" ~4 _guru give "advice" ~6 _sneakybugger = "Skul" camcreate getpos 1985forums exit Like I said, I think a couple of bits will cause errors, but who cares? Maybe I used some program that allows me to make my own commands! P.S. Don't worry, SpeedyDonkey, I ain't sore about the VIP awards. Share this post Link to post Share on other sites
Popee 0 Posted May 1, 2004 _president = Bush _Evil(True?) = Sadam #loop "_X doTarget group _president" foreach group _Evil(True?) "_X doFire group _president" foreach group _Evil(True?) ~10 ? (!alive _Evil((True?))) : goto"exit" #attack cameraID="HEAT125" camcreate getPos Baghdad ~0.1 goto"attack" #exit exit Share this post Link to post Share on other sites
The Frenchman 0 Posted May 2, 2004 Erm... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Frenchie = Frenchman _1337 = Frenchman's enemies #loop "_X do Target group _1337 I told you I suck at scripting! Share this post Link to post Share on other sites
MrZig 0 Posted May 2, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _guy = The Frenchman ?nationality _guy == "France" OR nationality _guy == "Quebec" : goto "french" goto "imposter" hint "ERROR" exit #french _guy allowfleeing 1 _guy setcaptive true exit #imposter {_X globalchat "Frenchman, we want proof your french! I think your an imposter!"} foreach units GroupBIForums @reply _guy {_X globalchat "We don't care what you say! Imposter! Kill him!"} foreach units GroupBIForums _sticksnstones = "bottle1" camcreate [getpos _guy select 0, getpos _guy select 2, 10] _sticksnstones setvelocity [0,0,-10] @getdammage _guy <1 _guy setdammage 1 permaban _guy exit Share this post Link to post Share on other sites
cozza 24 Posted May 2, 2004 Here my crappy code <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Batdog dotarget BISforumMembers Batdog setcombatmode "Blue" ~10 Batdog switchmove "ScratchHead" ~1 Batdog setcombatmode "red" ~10 mum=bringfood ~5 Batdog setdammage 1 Share this post Link to post Share on other sites
Popee 0 Posted May 3, 2004 _duff = 100 _moe = moe _barney = barney _homer = homer #loop ~10 ?(_duff = 0):goto"attack" ?(_duff = 25):goto"caution" ?(_duff = 10):goto"warning" #drink ~10 _barney globalchat "Hmm...Duff..." ~5 _homer globalchat "Yeah...Duff...Woohoo!!" ~5 _moe globalchat "Hey Homer,Would you like more Duff?" ~2 _homer globalchat "Yeah!! WhooWhoo!!" _duff = _duff -1 goto"loop" #caution ~5 _moe globalchat "Hey Barney and Homer,You should not drink the beer any longer. " _homer globalchat"Yeah...OK...OK..." goto"drink" #warning ~5 _moe globalchat"HEY!!DO YOU THINK THAT YOU DRINK ALL MY BAR'S DUFF!?" goto"drink" #attack _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe addMagazine"GRENADE_Duff" _moe fire["throw","GRENADE_Duff"] ~3 ?(!alive _barney)&&(!alive _homer):goto"end" goto"attack" #end _barney globalchat "NOOO!!" _moe globalchat "HAHAHA!!" _homer globalchat "HMM...DUFF...DUFF..." goto"endcredit" Share this post Link to post Share on other sites
AdmiralKarlDonuts 0 Posted May 3, 2004 ?(seal84 in exam): seal84 setskill 1 ~1 setacctime 4 ~1 seal84 action ["Take test"] @unitready seal84 setacctime 1 ~1 seal84 move (getpos professor) @unitready seal84 seal84 removeweapon "test" ~2 professor addweapon "test" ~1 professor globalchat "Seal you aced the final!" ~.5 seal84 addrating 100 ~1 seal84 setmimic "smile" ~1 savegame ~1 deletevehicle professor ~2 seal84 move getpos dorm @unitready seal84 seal84 moveindriver bed exit Share this post Link to post Share on other sites
Pathy 0 Posted May 3, 2004 it said "scripting real life" Seal, not your dreams.... Share this post Link to post Share on other sites
AdmiralKarlDonuts 0 Posted May 3, 2004 #loop revenge = "laserguidedbomb" camcreate (getpos pathy) ~5 ?(alive pathy): goto "loop" Share this post Link to post Share on other sites
Pathy 0 Posted May 3, 2004 protection = "Bombproofbunker" camcreate (getpos pathy) ~2 pathy globalchat "Seal i was joking, stop throwing bombs at me!" Not bad for someone who doesnt script Share this post Link to post Share on other sites
AdmiralKarlDonuts 0 Posted May 3, 2004 commando move getpos seal84 @unitready commando comando dotarget seal84 ~2 commando globalchat "Any more bomb-throwing and you're a dead man!" ~5 disableuserinput seal84 ~1 removeallweapons seal84 ~1 ?(getdammage pathy > 0): pathy setdammage 0 ~1 seal84 globalchat "Heh heh...all better now...*gulp*" exit Lol, no, I don't do complicated scripting...I pick little bits up here and there when I need them, but that's about it. Share this post Link to post Share on other sites