tx · GA9LA5di3b8npcozSV3RArUxbYgHKCq9ykxLf7xEBGaP 3MsNU6eQC1F3m7yiqmkkw733kiE45J5NL8B: -0.01400000 Waves 2020.08.31 12:48 [1156714] smart account 3MsNU6eQC1F3m7yiqmkkw733kiE45J5NL8B > SELF 0.00000000 Waves
{ "type": 13, "id": "GA9LA5di3b8npcozSV3RArUxbYgHKCq9ykxLf7xEBGaP", "fee": 1400000, "feeAssetId": null, "timestamp": 1598867339563, "version": 1, "sender": "3MsNU6eQC1F3m7yiqmkkw733kiE45J5NL8B", "senderPublicKey": "ACwRxGgCQ8fyGhT2BkKEzPGCySdsKfjqs1w8xb51zhTR", "proofs": [ "5TwiWoL6RhvjK7xCL8jLKggBst1BYvvtij5LLfiv3i72hdVPA48h5b5dFk9wSAe5Y3UFiPz9abFfMJDuKBAnoJzL" ], "script": "base64:AAIDAAAAAAAAABEIARIECgIBARIFCgMBAQESAAAAAA0BAAAACXNldENvb3JkcwAAAAMAAAADa2V5AAAACGxhdGl0dWRlAAAACWxvbmdpdHVkZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAAxwb3NpdGlvbkxhdF8FAAAAA2tleQUAAAAIbGF0aXR1ZGUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAMcG9zaXRpb25Mb25fBQAAAANrZXkFAAAACWxvbmdpdHVkZQUAAAADbmlsAQAAAAtzZXRHYW1lRGF0YQAAAAIAAAAJcGxheWVyS2V5AAAAC29wcG9uZW50S2V5BAAAAAZnYW1lSWQJAAEsAAAAAgkAASwAAAACBQAAAAlwbGF5ZXJLZXkCAAAAAV8FAAAAC29wcG9uZW50S2V5CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAB2dhbWVJZF8FAAAACXBsYXllcktleQUAAAAGZ2FtZUlkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAACW9wcG9uZW50XwUA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sAAAAAWkBAAAABmZhdWNldAAAAAAEAAAABWFzc2V0AQAAACAhxSJ4o4NBiPHF8JwHLU46+AZS0OsOb1Q6JnPOfnRaoAQAAAAGY2FsbGVyCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgQAAAAHYmFsYW5jZQkAA+sAAAACCAUAAAABaQAAAAZjYWxsZXIFAAAABWFzc2V0AwkAAGYAAAACAAAAAAAAAABkBQAAAAdiYWxhbmNlCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAZAUAAAAFYXNzZXQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAADbmlsAAAAAPE6Hfc=", "chainId": 84, "height": 1156714, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Aesx36QsVCcctqxKzxJ4iFKy2g8Sy1LgKqvGpddwjjLU Next: 4MSCok1v6iYQvQSucY9AXyztX9G4YnqPmobTTALzV6NE Diff:
Old | New | Differences | |
---|---|---|---|
76 | 76 | else if ((0 > r)) | |
77 | 77 | then { | |
78 | 78 | let s = (-1 * r) | |
79 | - | let t = (((-1873 * s) / 100000) + 7426) | |
80 | - | let u = (((t * s) / 100000) - 21211) | |
81 | - | let v = (((u * s) / 100000) + 157072) | |
82 | - | let w = pow((100000 - s), 5, 5, 1, 5, HALFEVEN) | |
83 | - | -((157079 - ((w * v) / 100000))) | |
79 | + | let t = ((((((-1873 * s) / 100000) + 7426) * s) / 100000) - 21211) | |
80 | + | let u = (((t * s) / 100000) + 157072) | |
81 | + | let v = pow((100000 - s), 5, 5, 1, 5, HALFEVEN) | |
82 | + | -((157079 - ((v * u) / 100000))) | |
84 | 83 | } | |
85 | 84 | else { | |
86 | - | let | |
87 | - | let | |
88 | - | let | |
89 | - | let | |
90 | - | (157079 - (( | |
85 | + | let w = (((-1873 * r) / 100000) + 7426) | |
86 | + | let t = (((w * r) / 100000) - 21211) | |
87 | + | let u = (((t * r) / 100000) + 157072) | |
88 | + | let v = pow((100000 - r), 5, 5, 1, 5, HALFEVEN) | |
89 | + | (157079 - ((v * u) / 100000)) | |
91 | 90 | } | |
92 | 91 | ||
93 | 92 | ||
159 | 158 | } | |
160 | 159 | ||
161 | 160 | ||
162 | - | @Callable(aj) | |
161 | + | func aj (F,G,H,I) = { | |
162 | + | let ak = (I - G) | |
163 | + | let A = ((j(ak) * p(H)) / 100000) | |
164 | + | let r = (((p(F) * j(H)) - (((j(F) * p(H)) * p(ak)) / 100000)) / 100000) | |
165 | + | ((z(A, r) + 628318) % 628318) | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | @Callable(al) | |
163 | 170 | func startGame (c,d) = { | |
164 | - | let ak = base58'3GpoTGi5FENo3WAw2K9PjcS2UD4VHRLL2Lxoj9ckUHxb' | |
165 | - | let al = value(aj.payment) | |
166 | - | let am = toString(aj.caller) | |
167 | - | let an = a(am, ((c * 1745) / 100000), ((d * 1745) / 100000)) | |
168 | - | let ao = getString(this, "openGame") | |
169 | - | if (if ((al.assetId == ak)) | |
170 | - | then (al.amount >= 1) | |
171 | + | let am = base58'3GpoTGi5FENo3WAw2K9PjcS2UD4VHRLL2Lxoj9ckUHxb' | |
172 | + | let an = value(al.payment) | |
173 | + | let ao = toString(al.caller) | |
174 | + | let ac = ((c * 1745) / 100000) | |
175 | + | let ad = ((d * 1745) / 100000) | |
176 | + | let ap = a(ao, ac, ad) | |
177 | + | let aq = getString(this, "openGame") | |
178 | + | if (if ((an.assetId == am)) | |
179 | + | then (an.amount >= 1) | |
171 | 180 | else false) | |
172 | 181 | then { | |
173 | - | let h = getString(this, ("gameId_" + | |
182 | + | let h = getString(this, ("gameId_" + ao)) | |
174 | 183 | if (if ((h != "")) | |
175 | 184 | then (h != unit) | |
176 | 185 | else false) | |
177 | 186 | then throw("Please finish your current game, before starting another one") | |
178 | - | else if (!(isDefined( | |
179 | - | then WriteSet(DataEntry("openGame", | |
180 | - | else if (if (( | |
187 | + | else if (!(isDefined(aq))) | |
188 | + | then WriteSet(DataEntry("openGame", ao) :: ap) | |
189 | + | else if (if ((aq == "")) | |
181 | 190 | then true | |
182 | - | else (ao == am)) | |
183 | - | then WriteSet(DataEntry("openGame", am) :: an) | |
184 | - | else WriteSet([DataEntry("openGame", ""), an[0], an[1], e(value(ao), am)]) | |
191 | + | else (aq == ao)) | |
192 | + | then WriteSet(DataEntry("openGame", ao) :: ap) | |
193 | + | else { | |
194 | + | let aa = getIntegerValue(this, ("positionLat_" + value(aq))) | |
195 | + | let ab = getIntegerValue(this, ("positionLon_" + value(aq))) | |
196 | + | let ae = E(aa, ab, ac, ad) | |
197 | + | let ar = sha256(toBytes(ae)) | |
198 | + | let as = toInt(ar) | |
199 | + | let at = ((as % (628318 / 4)) - (628318 / 8)) | |
200 | + | let au = aj(aa, ab, ac, ad) | |
201 | + | let av = (au + at) | |
202 | + | let aw = ((au + 314159) % 628318) | |
203 | + | let ax = (aw + at) | |
204 | + | WriteSet([DataEntry("openGame", ""), ap[0], ap[1], DataEntry(("opponentOffsetYaw_" + ao), av), DataEntry(("opponentOffsetYaw_" + value(aq)), ax), e(value(aq), ao)]) | |
205 | + | } | |
185 | 206 | } | |
186 | 207 | else throw("Please pay the token") | |
187 | 208 | } | |
188 | 209 | ||
189 | 210 | ||
190 | 211 | ||
191 | - | @Callable( | |
212 | + | @Callable(al) | |
192 | 213 | func executeShot (D,R,Z) = { | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | let h = i( | |
197 | - | if ((getStringValue(this, ("gameTurn_" + h)) != | |
214 | + | let am = base58'3GpoTGi5FENo3WAw2K9PjcS2UD4VHRLL2Lxoj9ckUHxb' | |
215 | + | let ao = toString(al.caller) | |
216 | + | let ay = getStringValue(this, ("opponent_" + ao)) | |
217 | + | let h = i(ao) | |
218 | + | if ((getStringValue(this, ("gameTurn_" + h)) != ao)) | |
198 | 219 | then throw("Please wait for your turn.") | |
199 | 220 | else { | |
200 | - | let | |
201 | - | if (((( | |
202 | - | then ScriptResult(WriteSet([DataEntry(("game_" + h), false), DataEntry(("gameWinner_" + h), | |
203 | - | else WriteSet([DataEntry(("gameTurn_" + h), | |
221 | + | let az = Y(D, R, Z, ao, ay) | |
222 | + | if ((((az[1] / 5) + 10000000000) > az[0])) | |
223 | + | then ScriptResult(WriteSet([DataEntry(("game_" + h), false), DataEntry(("gameWinner_" + h), ao), DataEntry(("gameId_" + ao), ""), DataEntry(("gameId_" + ay), ""), DataEntry(("lastShotDistance_" + h), az[0]), DataEntry(("lastShotLat_" + h), az[2]), DataEntry(("lastShotLon_" + h), az[3])]), TransferSet([ScriptTransfer(al.caller, 2, am)])) | |
224 | + | else WriteSet([DataEntry(("gameTurn_" + h), ay), DataEntry(("lastShotDistance_" + h), az[0]), DataEntry(("lastShotLat_" + h), az[2]), DataEntry(("lastShotLon_" + h), az[3])]) | |
204 | 225 | } | |
205 | 226 | } | |
206 | 227 | ||
207 | 228 | ||
208 | 229 | ||
209 | - | @Callable( | |
230 | + | @Callable(al) | |
210 | 231 | func faucet () = { | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | if ((100 > | |
215 | - | then TransferSet([ScriptTransfer( | |
232 | + | let am = base58'3GpoTGi5FENo3WAw2K9PjcS2UD4VHRLL2Lxoj9ckUHxb' | |
233 | + | let ao = toString(al.caller) | |
234 | + | let aA = assetBalance(al.caller, am) | |
235 | + | if ((100 > aA)) | |
236 | + | then TransferSet([ScriptTransfer(al.caller, 100, am)]) | |
216 | 237 | else TransferSet(nil) | |
217 | 238 | } | |
218 | 239 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b,c,d) = [DataEntry(("positionLat_" + b), c), DataEntry(("positionLon_" + b), d)] | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func e (f,g) = { | |
8 | 8 | let h = ((f + "_") + g) | |
9 | 9 | [DataEntry(("gameId_" + f), h), DataEntry(("opponent_" + f), g), DataEntry(("gameId_" + g), h), DataEntry(("opponent_" + g), f), DataEntry(("game_" + h), true), DataEntry(("gameTurn_" + h), f), DataEntry(("gameWinner_" + h), "")] | |
10 | 10 | } | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func i (b) = getStringValue(this, ("gameId_" + b)) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func j (k) = { | |
17 | 17 | let l = (k / 628318) | |
18 | 18 | if ((0 > k)) | |
19 | 19 | then { | |
20 | 20 | let m = -(k) | |
21 | 21 | if ((m > 628318)) | |
22 | 22 | then { | |
23 | 23 | let n = (m + (l * 628318)) | |
24 | 24 | if ((n > 314159)) | |
25 | 25 | then { | |
26 | 26 | let o = ((16 * (n - 314159)) * (314159 - (n - 314159))) | |
27 | 27 | ((o * 100000) / (493480220050 - (o / 4))) | |
28 | 28 | } | |
29 | 29 | else { | |
30 | 30 | let o = ((16 * n) * (314159 - n)) | |
31 | 31 | ((-(o) * 100000) / (493480220050 - (o / 4))) | |
32 | 32 | } | |
33 | 33 | } | |
34 | 34 | else if ((m > 314159)) | |
35 | 35 | then { | |
36 | 36 | let o = ((16 * (m - 314159)) * (314159 - (m - 314159))) | |
37 | 37 | ((o * 100000) / (493480220050 - (o / 4))) | |
38 | 38 | } | |
39 | 39 | else { | |
40 | 40 | let o = ((16 * m) * (314159 - m)) | |
41 | 41 | ((-(o) * 100000) / (493480220050 - (o / 4))) | |
42 | 42 | } | |
43 | 43 | } | |
44 | 44 | else if ((k > 628318)) | |
45 | 45 | then { | |
46 | 46 | let n = (k - (l * 628318)) | |
47 | 47 | if ((n > 314159)) | |
48 | 48 | then { | |
49 | 49 | let o = ((16 * (n - 314159)) * (314159 - (n - 314159))) | |
50 | 50 | ((-(o) * 100000) / (493480220050 - (o / 4))) | |
51 | 51 | } | |
52 | 52 | else { | |
53 | 53 | let o = ((16 * n) * (314159 - n)) | |
54 | 54 | ((o * 100000) / (493480220050 - (o / 4))) | |
55 | 55 | } | |
56 | 56 | } | |
57 | 57 | else if ((k > 314159)) | |
58 | 58 | then { | |
59 | 59 | let o = ((16 * (k - 314159)) * (314159 - (k - 314159))) | |
60 | 60 | ((-(o) * 100000) / (493480220050 - (o / 4))) | |
61 | 61 | } | |
62 | 62 | else { | |
63 | 63 | let o = ((16 * k) * (314159 - k)) | |
64 | 64 | ((o * 100000) / (493480220050 - (o / 4))) | |
65 | 65 | } | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func p (k) = j((157079 - k)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func q (r) = if ((-100000 >= r)) | |
73 | 73 | then -157079 | |
74 | 74 | else if ((r >= 100000)) | |
75 | 75 | then 157079 | |
76 | 76 | else if ((0 > r)) | |
77 | 77 | then { | |
78 | 78 | let s = (-1 * r) | |
79 | - | let t = (((-1873 * s) / 100000) + 7426) | |
80 | - | let u = (((t * s) / 100000) - 21211) | |
81 | - | let v = (((u * s) / 100000) + 157072) | |
82 | - | let w = pow((100000 - s), 5, 5, 1, 5, HALFEVEN) | |
83 | - | -((157079 - ((w * v) / 100000))) | |
79 | + | let t = ((((((-1873 * s) / 100000) + 7426) * s) / 100000) - 21211) | |
80 | + | let u = (((t * s) / 100000) + 157072) | |
81 | + | let v = pow((100000 - s), 5, 5, 1, 5, HALFEVEN) | |
82 | + | -((157079 - ((v * u) / 100000))) | |
84 | 83 | } | |
85 | 84 | else { | |
86 | - | let | |
87 | - | let | |
88 | - | let | |
89 | - | let | |
90 | - | (157079 - (( | |
85 | + | let w = (((-1873 * r) / 100000) + 7426) | |
86 | + | let t = (((w * r) / 100000) - 21211) | |
87 | + | let u = (((t * r) / 100000) + 157072) | |
88 | + | let v = pow((100000 - r), 5, 5, 1, 5, HALFEVEN) | |
89 | + | (157079 - ((v * u) / 100000)) | |
91 | 90 | } | |
92 | 91 | ||
93 | 92 | ||
94 | 93 | func x (r) = { | |
95 | 94 | let y = ((r * r) / 100000) | |
96 | 95 | if ((-100000 > r)) | |
97 | 96 | then (-157079 - ((r * 100000) / (y + 28000))) | |
98 | 97 | else if ((r > 100000)) | |
99 | 98 | then (157079 - ((r * 100000) / (y + 28000))) | |
100 | 99 | else ((r * 100000) / (100000 + ((28000 * y) / 100000))) | |
101 | 100 | } | |
102 | 101 | ||
103 | 102 | ||
104 | 103 | func z (A,r) = if ((r > 0)) | |
105 | 104 | then x((A / r)) | |
106 | 105 | else if (if ((0 > r)) | |
107 | 106 | then (A >= 0) | |
108 | 107 | else false) | |
109 | 108 | then (x((A / r)) + 314159) | |
110 | 109 | else if (if ((0 > r)) | |
111 | 110 | then (0 > A) | |
112 | 111 | else false) | |
113 | 112 | then (x((A / r)) - 314159) | |
114 | 113 | else if (if ((r == 0)) | |
115 | 114 | then (A > 0) | |
116 | 115 | else false) | |
117 | 116 | then 157079 | |
118 | 117 | else if (if ((r == 0)) | |
119 | 118 | then (0 > A) | |
120 | 119 | else false) | |
121 | 120 | then -157079 | |
122 | 121 | else 0 | |
123 | 122 | ||
124 | 123 | ||
125 | 124 | func B (C,D) = (((2 * C) * ((p(D) * j(D)) / 100000)) / 980665) | |
126 | 125 | ||
127 | 126 | ||
128 | 127 | func E (F,G,H,I) = { | |
129 | 128 | let J = j(((F - H) / 2)) | |
130 | 129 | let K = j(((G - I) / 2)) | |
131 | 130 | let L = ((J * J) + (((p(F) * p(H)) / 100000) * ((K * K) / 100000))) | |
132 | 131 | let M = (2 * q(pow((L / 1000), 7, 5, 1, 5, HALFEVEN))) | |
133 | 132 | (6371000 * M) | |
134 | 133 | } | |
135 | 134 | ||
136 | 135 | ||
137 | 136 | func N (O,P,Q,R) = { | |
138 | 137 | let S = j(O) | |
139 | 138 | let T = p(O) | |
140 | 139 | let U = j((Q / 6371000)) | |
141 | 140 | let V = p((Q / 6371000)) | |
142 | 141 | let W = q((((S * V) / 100000) + (((T * U) * p(R)) / 10000000000))) | |
143 | 142 | let X = (P + z((((j(R) * U) * T) / 100000), (V - ((S * j(W)) / 100000)))) | |
144 | 143 | [W, X] | |
145 | 144 | } | |
146 | 145 | ||
147 | 146 | ||
148 | 147 | func Y (D,R,Z,f,g) = { | |
149 | 148 | let aa = getIntegerValue(this, ("positionLat_" + f)) | |
150 | 149 | let ab = getIntegerValue(this, ("positionLon_" + f)) | |
151 | 150 | let ac = getIntegerValue(this, ("positionLat_" + g)) | |
152 | 151 | let ad = getIntegerValue(this, ("positionLon_" + g)) | |
153 | 152 | let ae = E(aa, ab, ac, ad) | |
154 | 153 | let af = ((ae * 980665) / 100000) | |
155 | 154 | let ag = B(((af * Z) / 100000), D) | |
156 | 155 | let ah = N(aa, ab, ag, R) | |
157 | 156 | let ai = E(ah[0], ah[1], ac, ad) | |
158 | 157 | [ai, ae] :: ah | |
159 | 158 | } | |
160 | 159 | ||
161 | 160 | ||
162 | - | @Callable(aj) | |
161 | + | func aj (F,G,H,I) = { | |
162 | + | let ak = (I - G) | |
163 | + | let A = ((j(ak) * p(H)) / 100000) | |
164 | + | let r = (((p(F) * j(H)) - (((j(F) * p(H)) * p(ak)) / 100000)) / 100000) | |
165 | + | ((z(A, r) + 628318) % 628318) | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | @Callable(al) | |
163 | 170 | func startGame (c,d) = { | |
164 | - | let ak = base58'3GpoTGi5FENo3WAw2K9PjcS2UD4VHRLL2Lxoj9ckUHxb' | |
165 | - | let al = value(aj.payment) | |
166 | - | let am = toString(aj.caller) | |
167 | - | let an = a(am, ((c * 1745) / 100000), ((d * 1745) / 100000)) | |
168 | - | let ao = getString(this, "openGame") | |
169 | - | if (if ((al.assetId == ak)) | |
170 | - | then (al.amount >= 1) | |
171 | + | let am = base58'3GpoTGi5FENo3WAw2K9PjcS2UD4VHRLL2Lxoj9ckUHxb' | |
172 | + | let an = value(al.payment) | |
173 | + | let ao = toString(al.caller) | |
174 | + | let ac = ((c * 1745) / 100000) | |
175 | + | let ad = ((d * 1745) / 100000) | |
176 | + | let ap = a(ao, ac, ad) | |
177 | + | let aq = getString(this, "openGame") | |
178 | + | if (if ((an.assetId == am)) | |
179 | + | then (an.amount >= 1) | |
171 | 180 | else false) | |
172 | 181 | then { | |
173 | - | let h = getString(this, ("gameId_" + | |
182 | + | let h = getString(this, ("gameId_" + ao)) | |
174 | 183 | if (if ((h != "")) | |
175 | 184 | then (h != unit) | |
176 | 185 | else false) | |
177 | 186 | then throw("Please finish your current game, before starting another one") | |
178 | - | else if (!(isDefined( | |
179 | - | then WriteSet(DataEntry("openGame", | |
180 | - | else if (if (( | |
187 | + | else if (!(isDefined(aq))) | |
188 | + | then WriteSet(DataEntry("openGame", ao) :: ap) | |
189 | + | else if (if ((aq == "")) | |
181 | 190 | then true | |
182 | - | else (ao == am)) | |
183 | - | then WriteSet(DataEntry("openGame", am) :: an) | |
184 | - | else WriteSet([DataEntry("openGame", ""), an[0], an[1], e(value(ao), am)]) | |
191 | + | else (aq == ao)) | |
192 | + | then WriteSet(DataEntry("openGame", ao) :: ap) | |
193 | + | else { | |
194 | + | let aa = getIntegerValue(this, ("positionLat_" + value(aq))) | |
195 | + | let ab = getIntegerValue(this, ("positionLon_" + value(aq))) | |
196 | + | let ae = E(aa, ab, ac, ad) | |
197 | + | let ar = sha256(toBytes(ae)) | |
198 | + | let as = toInt(ar) | |
199 | + | let at = ((as % (628318 / 4)) - (628318 / 8)) | |
200 | + | let au = aj(aa, ab, ac, ad) | |
201 | + | let av = (au + at) | |
202 | + | let aw = ((au + 314159) % 628318) | |
203 | + | let ax = (aw + at) | |
204 | + | WriteSet([DataEntry("openGame", ""), ap[0], ap[1], DataEntry(("opponentOffsetYaw_" + ao), av), DataEntry(("opponentOffsetYaw_" + value(aq)), ax), e(value(aq), ao)]) | |
205 | + | } | |
185 | 206 | } | |
186 | 207 | else throw("Please pay the token") | |
187 | 208 | } | |
188 | 209 | ||
189 | 210 | ||
190 | 211 | ||
191 | - | @Callable( | |
212 | + | @Callable(al) | |
192 | 213 | func executeShot (D,R,Z) = { | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | let h = i( | |
197 | - | if ((getStringValue(this, ("gameTurn_" + h)) != | |
214 | + | let am = base58'3GpoTGi5FENo3WAw2K9PjcS2UD4VHRLL2Lxoj9ckUHxb' | |
215 | + | let ao = toString(al.caller) | |
216 | + | let ay = getStringValue(this, ("opponent_" + ao)) | |
217 | + | let h = i(ao) | |
218 | + | if ((getStringValue(this, ("gameTurn_" + h)) != ao)) | |
198 | 219 | then throw("Please wait for your turn.") | |
199 | 220 | else { | |
200 | - | let | |
201 | - | if (((( | |
202 | - | then ScriptResult(WriteSet([DataEntry(("game_" + h), false), DataEntry(("gameWinner_" + h), | |
203 | - | else WriteSet([DataEntry(("gameTurn_" + h), | |
221 | + | let az = Y(D, R, Z, ao, ay) | |
222 | + | if ((((az[1] / 5) + 10000000000) > az[0])) | |
223 | + | then ScriptResult(WriteSet([DataEntry(("game_" + h), false), DataEntry(("gameWinner_" + h), ao), DataEntry(("gameId_" + ao), ""), DataEntry(("gameId_" + ay), ""), DataEntry(("lastShotDistance_" + h), az[0]), DataEntry(("lastShotLat_" + h), az[2]), DataEntry(("lastShotLon_" + h), az[3])]), TransferSet([ScriptTransfer(al.caller, 2, am)])) | |
224 | + | else WriteSet([DataEntry(("gameTurn_" + h), ay), DataEntry(("lastShotDistance_" + h), az[0]), DataEntry(("lastShotLat_" + h), az[2]), DataEntry(("lastShotLon_" + h), az[3])]) | |
204 | 225 | } | |
205 | 226 | } | |
206 | 227 | ||
207 | 228 | ||
208 | 229 | ||
209 | - | @Callable( | |
230 | + | @Callable(al) | |
210 | 231 | func faucet () = { | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | if ((100 > | |
215 | - | then TransferSet([ScriptTransfer( | |
232 | + | let am = base58'3GpoTGi5FENo3WAw2K9PjcS2UD4VHRLL2Lxoj9ckUHxb' | |
233 | + | let ao = toString(al.caller) | |
234 | + | let aA = assetBalance(al.caller, am) | |
235 | + | if ((100 > aA)) | |
236 | + | then TransferSet([ScriptTransfer(al.caller, 100, am)]) | |
216 | 237 | else TransferSet(nil) | |
217 | 238 | } | |
218 | 239 | ||
219 | 240 |
github/deemru/w8io/026f985 51.30 ms ◑